PipelineComponentInfos.GetEnumerator Метод

Определение

Возвращает перечислитель PipelineComponentInfoEnumerator для прохода по коллекции PipelineComponentInfos.

public:
 Microsoft::SqlServer::Dts::Runtime::PipelineComponentInfoEnumerator ^ GetEnumerator();
public Microsoft.SqlServer.Dts.Runtime.PipelineComponentInfoEnumerator GetEnumerator ();
override this.GetEnumerator : unit -> Microsoft.SqlServer.Dts.Runtime.PipelineComponentInfoEnumerator
Public Function GetEnumerator () As PipelineComponentInfoEnumerator

Возвращаемое значение

PipelineComponentInfoEnumerator

Перечислитель PipelineComponentInfoEnumerator.

Примеры

Следующий пример кода создает PipelineComponentInfoEnumerator метод с помощью GetEnumerator метода, а затем выполняет итерацию по коллекции.

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();  
            PipelineComponentInfos pInfos = app.PipelineComponentInfos;  

            //Create the Enumerator.  
            PipelineComponentInfoEnumerator myEnumerator = pInfos.GetEnumerator();  
            Console.WriteLine("The collection contains the following values:");  
            int i = 0;  
            while ((myEnuemrator.MoveNext()) && (myEnuemrator.Current != null))  
                Console.WriteLine("[{0}] {1}", i++, myEnuemrator.Current.Name);  

            Console.WriteLine();  
        }  
    }  
}  
Imports System  
Imports System.Collections.Generic  
Imports System.Text  
Imports Microsoft.SqlServer.Dts.Runtime  

Namespace TaskInfos_Item  
    Class Program  
        Shared  Sub Main(ByVal args() As String)  
            Dim app As Application =  New Application()   
            Dim pInfos As PipelineComponentInfos =  app.PipelineComponentInfos   

            'Create the Enumerator.  
            Dim myEnumerator As PipelineComponentInfoEnumerator =  pInfos.GetEnumerator()   
            Console.WriteLine("The collection contains the following values:")  
            Dim i As Integer =  0   
            While (myEnuemrator.MoveNext()) &&(myEnuemrator.Current <> Nothing)  
            Console.WriteLine("[{0}] {1}",i = Console.WriteLine("[{0}] {1}",i + 1  
            End While  

            Console.WriteLine()  
        End Sub  
    End Class  
End Namespace  

Образец вывода:

Коллекция содержит следующие значения:

[0] Слияние

[1] Объединение слиянием

[2] Поиск

[3] Аудит

[4] Выборка строк

[5] Обработка измерений

[6] Извлечение термина

[7] Обучение модели интеллектуального анализа данных

[8] Источник OLE DB

[9] Карта символов

[10] Нечеткое группирование

Применяется к