다음을 통해 공유


LogProvider.Properties 속성

정의

DtsProperties 개체의 컬렉션을 포함하는 DtsProperty 컬렉션을 반환합니다.

public:
 property Microsoft::SqlServer::Dts::Runtime::DtsProperties ^ Properties { Microsoft::SqlServer::Dts::Runtime::DtsProperties ^ get(); };
public Microsoft.SqlServer.Dts.Runtime.DtsProperties Properties { get; }
member this.Properties : Microsoft.SqlServer.Dts.Runtime.DtsProperties
Public ReadOnly Property Properties As DtsProperties

속성 값

DtsProperties

DtsProperties 컬렉션입니다.

구현

예제

다음 예제에서는 패키지의 Properties 로그 공급자를 검색합니다. 샘플 패키지는 SSIS 로그 공급자 for Text 파일에 로그하기 위해 로드하기 전에 디자이너에서 수정되었습니다.

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

namespace LogProvider_Properties_Test  
{  
    class Program  
    {  
        static void Main(string[] args)  
        {  
            // The package is one of the SSIS Samples.  
            string mySample = @"C:\Program Files\Microsoft SQL Server\100\Samples\Integration Services\Package Samples\CalculatedColumns Sample\CalculatedColumns\CalculatedColumns.dtsx";  

            // Create the Application, and load the sample.  
            Application app = new Application();  
            Package pkg = app.LoadPackage(mySample, null);  

            // Get the LogProviders collection.  
            LogProviders logProvs = pkg.LogProviders;  

            // Get the "SSIS log provider for Text files"  
            // provider from the collection.  
            LogProvider textLogProv = logProvs["SSIS log provider for Text files"];  

            // Get the Properties collection from the Text provider,  
            // and iterate through the Text provider properties,    
            // printing the property names of the Text provider.  
            DtsProperties logProperties = textLogProv.Properties;  

            foreach (DtsProperty logProp in logProperties)  
                Console.WriteLine(logProp.Name);  

        }  
    }  
}  
Imports System  
Imports System.Collections.Generic  
Imports System.Text  
Imports Microsoft.SqlServer.Dts.Runtime  

Namespace LogProvider_Properties_Test  
    Class Program  
        Shared  Sub Main(ByVal args() As String)  
            ' The package is one of the SSIS Samples.  
            Dim mySample As String =  "C:\Program Files\Microsoft SQL Server\100\Samples\Integration Services\Package Samples\CalculatedColumns Sample\CalculatedColumns\CalculatedColumns.dtsx"   

            ' Create the Application, and load the sample.  
            Dim app As Application =  New Application()   
            Dim pkg As Package =  app.LoadPackage(mySample,Nothing)   

            ' Get the LogProviders collection.  
            Dim logProvs As LogProviders =  pkg.LogProviders   

            ' Get the "SSIS log provider for Text files"  
            ' provider from the collection.  
            Dim textLogProv As LogProvider =  logProvs("SSIS log provider for Text files")   

            ' Get the Properties collection from the Text provider,  
            ' and iterate through the Text provider properties,    
            ' printing the property names of the Text provider.  
            Dim logProperties As DtsProperties =  textLogProv.Properties   

            Dim logProp As DtsProperty  
            For Each logProp In logProperties  
                Console.WriteLine(logProp.Name)  
            Next  

        End Sub  
    End Class  
End Namespace  

샘플 출력:

ConfigString

CreationName

설명

사용

적용 대상