AsyncCodeActivity.EndExecute(AsyncCodeActivityContext, IAsyncResult) Método

Definição

Quando está implementado em uma classe derivada e usando as informações de ambiente de execução especificadas notifica o runtime de fluxo de trabalho que a operação de atividade assíncrona associada foi concluída.When implemented in a derived class and using the specified execution environment information, notifies the workflow runtime that the associated asynchronous activity operation has completed.

protected:
 abstract void EndExecute(System::Activities::AsyncCodeActivityContext ^ context, IAsyncResult ^ result);
protected abstract void EndExecute (System.Activities.AsyncCodeActivityContext context, IAsyncResult result);
abstract member EndExecute : System.Activities.AsyncCodeActivityContext * IAsyncResult -> unit
Protected MustOverride Sub EndExecute (context As AsyncCodeActivityContext, result As IAsyncResult)

Parâmetros

context
AsyncCodeActivityContext

Informações que definem o ambiente de execução da AsyncCodeActivity.Information that defines the execution environment for the AsyncCodeActivity.

result
IAsyncResult

O IAsyncResult implementado que retorna o status de uma atividade assíncrona quando a execução termina.The implemented IAsyncResult that returns the status of an asynchronous activity when execution ends.

Exemplos

O exemplo a seguir mostra como substituir o EndExecute método em uma atividade personalizada.The following example shows how to override the EndExecute method in a custom activity.

    protected override void EndExecute(AsyncCodeActivityContext context, IAsyncResult result)
    {
        FileStream file = (FileStream)context.UserState;

        try
        {
            file.EndWrite(result);
            file.Flush();
        }
        finally
        {
            file.Close();
        }
    }
}

Aplica-se a