Share via


ForEachFromVarEnumerator Class

This enumerator is used to loop over the objects that are in the variable specified in VariableName.

Inheritance Hierarchy

System.Object
  Microsoft.SqlServer.Dts.Runtime.DtsObject
    Microsoft.SqlServer.Dts.Runtime.ForEachEnumerator
      Microsoft.SqlServer.Dts.Runtime.Enumerators.FromVar.ForEachFromVarEnumerator

Namespace:  Microsoft.SqlServer.Dts.Runtime.Enumerators.FromVar
Assembly:  Microsoft.SqlServer.ForEachFromVarEnumerator (in Microsoft.SqlServer.ForEachFromVarEnumerator.dll)

Syntax

'Declaration
Public NotInheritable Class ForEachFromVarEnumerator _
    Inherits ForEachEnumerator _
    Implements IDTSComponentPersist, IDTSForEachFromVarEnumerator
'Usage
Dim instance As ForEachFromVarEnumerator
public sealed class ForEachFromVarEnumerator : ForEachEnumerator, 
    IDTSComponentPersist, IDTSForEachFromVarEnumerator
public ref class ForEachFromVarEnumerator sealed : public ForEachEnumerator, 
    IDTSComponentPersist, IDTSForEachFromVarEnumerator
[<SealedAttribute>]
type ForEachFromVarEnumerator =  
    class 
        inherit ForEachEnumerator 
        interface IDTSComponentPersist 
        interface IDTSForEachFromVarEnumerator 
    end
public final class ForEachFromVarEnumerator extends ForEachEnumerator implements IDTSComponentPersist, IDTSForEachFromVarEnumerator

The ForEachFromVarEnumerator type exposes the following members.

Constructors

  Name Description
Public method ForEachFromVarEnumerator Initializes a new instance of the ForEachFromVarEnumerator class.

Top

Properties

  Name Description
Public property CollectionEnumerator Gets or sets Boolean that indicates if the foreach loop enumerator is enumerating collections of objects or enumerating collections of collections. (Inherited from ForEachEnumerator.)
Public property VariableName Gets or sets the name of the variable to enumerate.
Public property Version Returns the version number of the package. This property is read-only. (Inherited from ForEachEnumerator.)

Top

Methods

  Name Description
Public method CanUpdate A Boolean that indicates if the new package XML can update the old package XML. (Inherited from ForEachEnumerator.)
Public method Equals Determines whether two object instances are equal. (Inherited from DtsObject.)
Public method GetEnumerator Returns an enumerator that can iterate over the ForEachFromVarEnumerator instance. (Overrides ForEachEnumerator.GetEnumerator(Connections, VariableDispenser, IDTSInfoEvents, IDTSLogging).)
Public method GetHashCode Returns the hash code for this instance. (Inherited from DtsObject.)
Public method GetType (Inherited from Object.)
Public method InitializeForEachEnumerator Initializes the properties associated with the task. This method is called by the runtime and is not used in code. (Inherited from ForEachEnumerator.)
Public method LoadFromXML This method is not callable by your application code. To load a package saved as .xml, use the Application.LoadPackage method.
Public method SaveToXML This method is not callable by your application code. To save a package as .xml, use the Application.SaveToXml method.
Public method ToString (Inherited from Object.)
Public method Update This method updates the old package XML with the new package XML if CanUpdate is set to true. (Inherited from ForEachEnumerator.)
Public method Validate Allows the container to determine if it contains invalid settings that will prevent it from executing successfully. (Inherited from ForEachEnumerator.)

Top

Remarks

An example of the use of this enumerator is when a query is run, and the result of the query is stored in the variable. You can use this enumerator to loop over the query results.

Thread Safety

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

See Also

Reference

Microsoft.SqlServer.Dts.Runtime.Enumerators.FromVar Namespace