WorkflowApplication.Aborted プロパティ

定義

ワークフロー インスタンスが中止されたときに呼び出される Action<T> を取得または設定します。

public:
 property Action<System::Activities::WorkflowApplicationAbortedEventArgs ^> ^ Aborted { Action<System::Activities::WorkflowApplicationAbortedEventArgs ^> ^ get(); void set(Action<System::Activities::WorkflowApplicationAbortedEventArgs ^> ^ value); };
public Action<System.Activities.WorkflowApplicationAbortedEventArgs> Aborted { get; set; }
member this.Aborted : Action<System.Activities.WorkflowApplicationAbortedEventArgs> with get, set
Public Property Aborted As Action(Of WorkflowApplicationAbortedEventArgs)

プロパティ値

ワークフロー インスタンスが中止されたときに呼び出されるアクション。

次のコード例では、WorkflowApplication インスタンスのAborted ハンドラーに渡されたWorkflowApplicationAbortedEventArgsを検査し、ワークフローが中止された理由に関する情報を表示します。

wfApp.Aborted = delegate(WorkflowApplicationAbortedEventArgs e)
{
    // Display the exception that caused the workflow
    // to abort.
    Console.WriteLine("Workflow {0} Aborted.", e.InstanceId);
    Console.WriteLine("Exception: {0}\n{1}",
        e.Reason.GetType().FullName,
        e.Reason.Message);
};

注釈

WorkflowApplicationによってホストされているワークフローが中止されると、Aborted ハンドラーが呼び出され、Completed ハンドラーは呼び出されません。

適用対象