Partager via


EventInfos.GetEnumerator Method

Returns an enumerator for use in iterating over the EventInfos collection.

Espace de noms: Microsoft.SqlServer.Dts.Runtime
Assembly: Microsoft.SqlServer.ManagedDTS (in microsoft.sqlserver.manageddts.dll)

Syntaxe

'Déclaration
Public Function GetEnumerator As EventInfoEnumerator
public EventInfoEnumerator GetEnumerator ()
public:
EventInfoEnumerator^ GetEnumerator ()
public EventInfoEnumerator GetEnumerator ()
public function GetEnumerator () : EventInfoEnumerator

Valeur de retour

An EventInfoEnumerator object.

Notes

Enumerators are intended to be used only to read data in the collection. Enumerators cannot be used to modify the underlying collection.

The enumerator does not have exclusive access to the collection.

When an enumerator is created, it takes a snapshot of the current state of the collection. If changes are made to the collection, such as adding, modifying, or deleting elements, the snapshot gets out of synchronization and the enumerator throws an InvalidOperationException. Two enumerators created from the same collection at the same time can have different snapshots of the collection.

The enumerator is in a state that is not valid if it is positioned before the first element in the collection or after the last element in the collection. Whenever the enumerator is in a state that is not valid, calling Current throws an exception.

Initially, the enumerator is positioned before the first element in the collection. Reset also brings the enumerator back to this position. Therefore, after an enumerator is created or after Reset, MoveNext must be called to advance the enumerator to the first element of the collection before it reads the value of Current.

Current returns the same object until either MoveNext or Reset is called.

After the end of the collection is passed, the enumerator is again in a state that is not valid and calling MoveNext returns false. Calling Current throws an exception if the last call to MoveNext returned false.

Sécurité des threads

Any public static (Shared in Microsoft Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Plateformes

Plateformes de développement

Pour obtenir la liste des plateformes prises en charge, consultez Configuration matérielle et logicielle requise pour l'installation de SQL Server 2005.

Plateformes cibles

Pour obtenir la liste des plateformes prises en charge, consultez Configuration matérielle et logicielle requise pour l'installation de SQL Server 2005.

Voir aussi

Référence

EventInfos Class
EventInfos Members
Microsoft.SqlServer.Dts.Runtime Namespace