Task.ExecutionValue 속성

정의

사용자 정의 개체를 반환합니다. 이 필드는 읽기 전용입니다.

public:
 virtual property System::Object ^ ExecutionValue { System::Object ^ get(); };
public virtual object ExecutionValue { get; }
member this.ExecutionValue : obj
Public Overridable ReadOnly Property ExecutionValue As Object

속성 값

사용자 정의 개체입니다.

예제

다음 코드 예제에서는 상속 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

설명

ExecutionValue 클래스의 Task 속성은 실행 결과 관련 정보를 노출하거나 메시지를 게시하거나 반환 값을 반환 DTSExecResult 할 수 있는 작업을 제공하는 읽기 전용 개체 속성입니다. 예를 들어 태스크가 해당 메서드의 Execute 일부로 테이블에서 행을 삭제하는 경우 삭제된 ExecutionValue행 수를 반환할 수 있습니다. 그런 다음 태스크의 클라이언트는 이 값을 사용하여 태스크 간에 우선 순위 제약 조건을 설정할 수 있습니다.

태스크는 속성의 기본 구현과 해당 메서드 중에 태스크가 설정한 값을 재정의 ExecutionValue 합니다 Execute .

적용 대상