언어

LogProviderInfos.GetEnumerator 메서드

정의

컬렉션을 LogProviderInfos 반복할 때 사용할 수 있는 열거자를 반환합니다.

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

반품

LogProviderInfoEnumerator 컬렉션을 반복할 때 사용할 수 있는 열거기입니다.

예제

다음 코드 샘플은 메서드를 LogProviderInfoEnumerator 사용하여 를 GetEnumerator 생성한 후 컬렉션을 반복합니다.

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

namespace LogProvInfoProperties  
{  
    class Program  
    {  
        static void Main(string[] args)  
        {  
        Application app = new Application();  
        LogProviderInfos infos = app.LogProviderInfos;  

        //Create the Enumerator.  
        LogProviderInfoEnumerator myEnumerator = infos.GetEnumerator();  
        Console.WriteLine("The collection contains the following values:");  
        //Iterate over the collection using the indexer instead of foreach.  
        int i = 0;  
            while ((myEnumerator.MoveNext()) && (myEnumerator.Current != null))  
                Console.WriteLine("[{0}] {1}", i++, myEnumerator.Current.Name);  
        }  
    }  
}  
Imports System  
Imports System.Collections.Generic  
Imports System.Text  
Imports Microsoft.SqlServer.Dts.Runtime  

Namespace LogProvInfoProperties  
    Class Program  
        Shared  Sub Main(ByVal args() As String)  
        Dim app As Application =  New Application()   
        Dim infos As LogProviderInfos =  app.LogProviderInfos   

        'Create the Enumerator.  
        Dim myEnumerator As LogProviderInfoEnumerator =  infos.GetEnumerator()   
        Console.WriteLine("The collection contains the following values:")  
        'Iterate over the collection using the indexer instead of foreach.  
        Dim i As Integer =  0   
            While (myEnumerator.MoveNext()) &&(myEnumerator.Current <> Nothing)  
            Console.WriteLine("[{0}] {1}",i = Console.WriteLine("[{0}] {1}",i + 1  
            End While  
         End Sub  
    End Class  
End Namespace  

샘플 출력:

이 수집품에는 다음과 같은 값들이 포함되어 있습니다:

[0] 텍스트 파일을 위한 SSIS 로그 제공자

[1] SQL Server 프로파일러용 SSIS 로그 제공자

[2] SQL Server용 SSIS 로그 제공자

[3] Windows 이벤트 로그용 SSIS 로그 제공자

[4] XML 파일에 대한 SSIS 로그 제공자

적용 대상