Activity.Cancel(ActivityExecutionContext) Method

Definition

Called by the workflow runtime to cancel execution of an activity that is currently executing.

C#
protected internal virtual System.Workflow.ComponentModel.ActivityExecutionStatus Cancel(System.Workflow.ComponentModel.ActivityExecutionContext executionContext);

Parameters

executionContext
ActivityExecutionContext

The ActivityExecutionContext that contains the instance to cancel.

Returns

The status at the end of the operation that determines whether the activity remains in the canceling state or transitions to the closed state.

Applies to

Product Versions
.NET Framework 3.0, 3.5, 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