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 метод с помощью 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] Нечеткое группирование