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该方法创建一个PipelineComponentInfoEnumerator,然后循环访问集合。

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] 模糊分组

适用于