언어

DTSObjectHostType 열거형

정의

다른 작업이나 컨테이너를 호스팅하는 컨테이너 유형을 설명합니다.

public enum class DTSObjectHostType
public enum DTSObjectHostType
type DTSObjectHostType = 
Public Enum DTSObjectHostType
상속
DTSObjectHostType

필드

Name Description
Task 0

호스트는 하나의 과제입니다.

ConnectionManager 1

호스트는 연결 관리자입니다.

LogProvider 2

호스트는 로그 제공자입니다.

ForEachEnumerator 3

호스트는 포리치 조사원입니다.

예제

다음 코드 예시는 패키지를 생성하고 그 안에 컨테이너를 Sequence 추가합니다. 그 후 A FileSystemTask A를 작업 호스트에 추가하고, HostType 속성을 검토하여 열거에서 값을 DTSObjectHostType 반환합니다.

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

namespace Microsoft.SqlServer.SSIS.Samples  
{  
    class mySample  
    {  
        static void Main(string[] args)  
        {  
            Package package = new Package();  
            Sequence seq = (Sequence)package.Executables.Add("STOCK:SEQUENCE");  

            // Add a File System task.  
            Executable eFileTask1 = seq.Executables.Add("STOCK:FileSystemTask");  
            TaskHost thFileTask1 = eFileTask1 as TaskHost;  

            // Use the TaskHost variable to find the DtsObjectHostType.  
            DTSObjectHostType hType = thFileTask1.HostType;  
            Console.WriteLine("Host Type: {0}", hType);  
        }  
    }  
}  
Imports System  
Imports System.Collections.Generic  
Imports System.Text  
Imports Microsoft.SqlServer.Dts.Runtime  
Imports Microsoft.SqlServer.Dts.Tasks.FileSystemTask  

Namespace Microsoft.SqlServer.SSIS.Samples  
    Class mySample  
        Shared  Sub Main(ByVal args() As String)  
            Dim package As Package =  New Package()   
            Dim seq As Sequence = CType(package.Executables.Add("STOCK:SEQUENCE"), Sequence)  

            ' Add a File System task.  
            Dim eFileTask1 As Executable =  seq.Executables.Add("STOCK:FileSystemTask")   
            Dim thFileTask1 As TaskHost =  eFileTask1 as TaskHost   

            ' Use the TaskHost variable to find the DtsObjectHostType.  
            Dim hType As DTSObjectHostType =  thFileTask1.HostType   
            Console.WriteLine("Host Type: {0}", hType)  
        End Sub  
    End Class  
End Namespace  

샘플 출력:

호스트 유형: 작업

적용 대상