Compartilhar via


Propriedade do RDL ForEachEnumeratorInfos.Item

Returns a ForEachEnumeratorInfo object from the collection.

Namespace:  Microsoft.SqlServer.Dts.Runtime
Assembly:  Microsoft.SqlServer.ManagedDTS (em Microsoft.SqlServer.ManagedDTS.dll)

Sintaxe

'Declaração
Public ReadOnly Default Property Item ( _
    index As Object _
) As ForEachEnumeratorInfo 
    Get
'Uso
Dim instance As ForEachEnumeratorInfos 
Dim index As Object 
Dim value As ForEachEnumeratorInfo 

value = instance(index)
public ForEachEnumeratorInfo this[
    Object index
] { get; }
public:
property ForEachEnumeratorInfo^ default[Object^ index] {
    ForEachEnumeratorInfo^ get (Object^ index);
}
member Item : ForEachEnumeratorInfo
JScript dá suporte ao uso de propriedades indexadas, mas não à declaração de propriedades novas.

Parâmetros

  • index
    Tipo: System.Object
    The name, ID, or index of the object to return from the collection.

Valor da propriedade

Tipo: Microsoft.SqlServer.Dts.Runtime.ForEachEnumeratorInfo
A ForEachEnumeratorInfo object.

Exemplos

The following code example retrieves an item from the collection by index and name, using the feInfos[0] syntax.

ObservaçãoObservação

To use the following code sample with a locale other than English, change the string, "For Each Item Enumerator", to the localized name of the enumerator.

using System;
using System.Collections.Generic;
using System.Text;
using Microsoft.SqlServer.Dts.Runtime;

namespace TaskInfos_Item
{
    class Program
    {
        static void Main(string[] args)
        {
            Application app = new Application();
            ForEachEnumeratorInfos feInfos = app.ForEachEnumeratorInfos;

            //Using the Item method syntax of [x], obtain the 
            //description of the first entry.
            ForEachEnumeratorInfo feInfo = feInfos[0];
            String nameOfFirstItem = feInfos[0].Name;
            Console.WriteLine("Description of ForEach entry: {0}", nameOfFirstItem);

            //Using the Item method syntax of [x], obtain the ID
            // of the entry with the name, For Each Item Enumerator.
            feInfo = feInfos["For Each Item Enumerator"];
            String IDOfItem = feInfos["For Each Item Enumerator"].ID;
            Console.WriteLine("ID of ForEach entry: {0}", IDOfItem);
        }
    }
}

Sample Output:

Description of ForEach entry: For Each File Enumerator

ID of ForEach entry: {62C3D0DC-C6A3-4A08-84F3-6028B2452F41}

Consulte também

Referência

ForEachEnumeratorInfos Classe

Namespace Microsoft.SqlServer.Dts.Runtime