Aracılığıyla paylaş


Task.ExecutionValue Özelliği

Kullanıcı tanımlı bir nesne döndürür.Bu alan salt okunur durumdadır.

Ad Alanı:  Microsoft.SqlServer.Dts.Runtime
Derleme:  Microsoft.SqlServer.ManagedDTS (Microsoft.SqlServer.ManagedDTS içinde.dll)

Sözdizimi

'Bildirim
Public Overridable ReadOnly Property ExecutionValue As Object
    Get
'Kullanım
Dim instance As Task
Dim value As Object

value = instance.ExecutionValue
public virtual Object ExecutionValue { get; }
public:
virtual property Object^ ExecutionValue {
    Object^ get ();
}
abstract ExecutionValue : Object
override ExecutionValue : Object
function get ExecutionValue () : Object

Özellik Değeri

Tür: System.Object
Kullanıcı tanımlı bir nesne.

Açıklamalar

ExecutionValue özellik Task sınıf görevi, yürütme sonuçlar ile ilgili bilgiler açığa çıkaran, ileti göndermek veya dönüş olanağı veren bir salt okunur nesne özellik olan DTSExecResult dönüş değeri.Örneğin, bir görev satırları siler, bir tablo bir parçası olarak kendi Execute yöntem, onu döndürebilir olarak silinen satır sayısını ExecutionValue.Görev istemcileri görevler arasında öncelik kısıtlamaları kurmak için bu değer daha sonra kullanabilirsiniz.

Görevleri, temel uygulama geçersiz kılmak ExecutionValue özellik ve sırasında görev tarafından küme bir değeri, Execute yöntem.

Örnekler

Aşağıdaki kod örneği, devraldığı posta Gönder görev oluşturur Taskve sonra görevi devralınan özelliklerini görüntüler.

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

Örnek Çıktı:

ExecutionValue:

Sürüm: 0

WaitForMe: True