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] Нечеткая группировка