AsyncCodeActivity.EndExecute(AsyncCodeActivityContext, IAsyncResult) Method
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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)
- context
- AsyncCodeActivityContext
Information that defines the execution environment for the AsyncCodeActivity.
- result
- IAsyncResult
The implemented IAsyncResult that returns the status of an asynchronous activity when execution ends.
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();
}
}
}
Product | Versions |
---|---|
.NET Framework | 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
.NET feedback
.NET is an open source project. Select a link to provide feedback: