WorkflowApplicationAbortedEventArgs 類別

定義

提供已中止工作流程執行個體的相關資料。Provides data about an aborted workflow instance.

public ref class WorkflowApplicationAbortedEventArgs : System::Activities::WorkflowApplicationEventArgs
public class WorkflowApplicationAbortedEventArgs : System.Activities.WorkflowApplicationEventArgs
type WorkflowApplicationAbortedEventArgs = class
    inherit WorkflowApplicationEventArgs
Public Class WorkflowApplicationAbortedEventArgs
Inherits WorkflowApplicationEventArgs
繼承
WorkflowApplicationAbortedEventArgs

範例

下列程式碼範例會檢查傳遞給 WorkflowApplicationAbortedEventArgs 執行個體之 Aborted 處理常式的 WorkflowApplication,並且顯示工作流程中止原因的相關資訊。The following code example inspects the WorkflowApplicationAbortedEventArgs passed into the Aborted handler of a WorkflowApplication instance and displays information about why workflow was aborted.

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 處理常式。When a workflow hosted by a WorkflowApplication is aborted, the Aborted handler is invoked and the Completed handler is not invoked.

屬性

InstanceId

工作流程執行個體的唯一識別碼。The unique identifier of the workflow instance.

(繼承來源 WorkflowApplicationEventArgs)
Reason

取得例外狀況,其可提供工作流程執行個體中止原因的相關資訊。Gets the exception that provides information about why the workflow instance was aborted.

方法

Equals(Object)

判斷指定的物件是否等於目前的物件。Determines whether the specified object is equal to the current object.

(繼承來源 Object)
GetHashCode()

做為預設雜湊函式。Serves as the default hash function.

(繼承來源 Object)
GetInstanceExtensions<T>()

取得指定之型別的延伸集合。Gets the collection of extensions of the specified type.

(繼承來源 WorkflowApplicationEventArgs)
GetType()

取得目前執行個體的 TypeGets the Type of the current instance.

(繼承來源 Object)
MemberwiseClone()

建立目前 Object 的淺層複製。Creates a shallow copy of the current Object.

(繼承來源 Object)
ToString()

傳回代表目前物件的字串。Returns a string that represents the current object.

(繼承來源 Object)

適用於