Task.Version 속성

정의

멤버는 더 이상 사용되지 않습니다. 은 비고를 참조하세요. *** 태스크 버전을 반환합니다. 이 속성은 읽기 전용입니다.

public:
 virtual property int Version { int get(); };
public virtual int Version { get; }
member this.Version : int
Public Overridable ReadOnly Property Version As Integer

속성 값

작업 버전 번호를 포함하는 정수입니다.

예제

다음 코드 예제에서는 상속 Task된 메일 보내기 작업을 만든 다음 상속된 속성을 표시합니다.

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

namespace Microsoft.SqlServer.SSIS.Samples  
{  
    class Program  
    {  
        static void Main(string[] args)  
        {  
            Application app = new Application();  
            Package pkg = new Package();  
            // Add a Send Mail task to the package.  
            Executable exec = pkg.Executables.Add("STOCK:SendMailTask");  

            // Cast the task to its own class.  
            TaskHost th = exec as TaskHost;  
            SendMailTask smTask = th.InnerObject as SendMailTask;  

            // Display the properties inherited from Task.  
            Console.WriteLine("ExecutionValue: {0}", smTask.ExecutionValue);  
            Console.WriteLine("Version: {0}", smTask.Version);  
            Console.WriteLine("WaitForMe: {0}", smTask.WaitForMe);  
        }  
    }  
}  
Imports System  
Imports System.Collections.Generic  
Imports System.Text  
Imports Microsoft.SqlServer.Dts.Runtime  
Imports Microsoft.SqlServer.Dts.Tasks.SendMailTask  

Namespace Microsoft.SqlServer.SSIS.Samples  
    Class Program  
        Shared  Sub Main(ByVal args() As String)  
            Dim app As Application =  New Application()   
            Dim pkg As Package =  New Package()   
            ' Add a Send Mail task to the package.  
            Dim exec As Executable =  pkg.Executables.Add("STOCK:SendMailTask")   

            ' Cast the task to its own class.  
            Dim th As TaskHost =  exec as TaskHost   
            Dim smTask As SendMailTask =  th.InnerObject as SendMailTask   

            ' Display the properties inherited from Task.  
            Console.WriteLine("ExecutionValue: {0}", smTask.ExecutionValue)  
            Console.WriteLine("Version: {0}", smTask.Version)  
            Console.WriteLine("WaitForMe: {0}", smTask.WaitForMe)  
        End Sub  
    End Class  
End Namespace  

샘플 출력:

ExecutionValue:

버전: 0

WaitForMe: True

설명

참고

이 멤버는 이후 버전의 MicrosoftSQL 서버에서 제거됩니다. 새 개발 작업에서 이 멤버를 사용하지 말고 현재 이 멤버를 사용하는 애플리케이션을 수정할 계획입니다.

적용 대상