共用方式為


Activity.Cancel(ActivityExecutionContext) 方法

定義

由工作流程執行階段呼叫,以取消執行目前執行的活動。

protected public:
 virtual System::Workflow::ComponentModel::ActivityExecutionStatus Cancel(System::Workflow::ComponentModel::ActivityExecutionContext ^ executionContext);
protected internal virtual System.Workflow.ComponentModel.ActivityExecutionStatus Cancel (System.Workflow.ComponentModel.ActivityExecutionContext executionContext);
abstract member Cancel : System.Workflow.ComponentModel.ActivityExecutionContext -> System.Workflow.ComponentModel.ActivityExecutionStatus
override this.Cancel : System.Workflow.ComponentModel.ActivityExecutionContext -> System.Workflow.ComponentModel.ActivityExecutionStatus
Protected Friend Overridable Function Cancel (executionContext As ActivityExecutionContext) As ActivityExecutionStatus

參數

executionContext
ActivityExecutionContext

ActivityExecutionContext,包含要取消的執行個體。

傳回

作業結束時的狀態,可判斷活動停留在取消狀態,或轉換為已關閉狀態。

適用於