Task.ExecutionValue Propiedad

Definición

Devuelve un objeto definido por el usuario. Este campo es de solo lectura.

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

Valor de propiedad

Un objeto definido por el usuario.

Ejemplos

En el ejemplo de código siguiente se crea la tarea Enviar correo, que hereda de Tasky, a continuación, se muestran las propiedades que ha heredado la tarea.

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  

Salida del ejemplo:

ExecutionValue:

Versión: 0

WaitForMe: True

Comentarios

La ExecutionValue propiedad de la Task clase es una propiedad de objeto de solo lectura que proporciona a la tarea la capacidad de exponer información sobre los resultados de su ejecución, publicar mensajes o devolver el DTSExecResult valor devuelto. Por ejemplo, si una tarea elimina filas de una tabla como parte de su Execute método, podría devolver el número de filas eliminadas como ExecutionValue. Después, los clientes de la tarea podrían usar este valor para establecer restricciones de precedencia entre las tareas.

Las tareas invalidan la implementación base de la ExecutionValue propiedad y un valor establecido por la tarea durante su Execute método.

Se aplica a