WorkflowApplicationAbortedEventArgs Class

Definition

提供已中止的工作流实例的有关数据。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
Inheritance
WorkflowApplicationAbortedEventArgs

Examples

下面的代码示例检查传递给 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);
};

Remarks

当由 WorkflowApplication 承载的工作流中止时,将调用 Aborted 处理程序,而不调用 Completed 处理程序。When a workflow hosted by a WorkflowApplication is aborted, the Aborted handler is invoked and the Completed handler is not invoked.

Properties

InstanceId

工作流实例的唯一标识符。The unique identifier of the workflow instance.

(Inherited from WorkflowApplicationEventArgs)
Reason

获取提供有关工作流实例中止原因信息的异常。Gets the exception that provides information about why the workflow instance was aborted.

Methods

Equals(Object)

确定指定的对象是否等于当前对象。Determines whether the specified object is equal to the current object.

(Inherited from Object)
GetHashCode()

作为默认哈希函数。Serves as the default hash function.

(Inherited from Object)
GetInstanceExtensions<T>()

获取指定类型的扩展的集合。Gets the collection of extensions of the specified type.

(Inherited from WorkflowApplicationEventArgs)
GetType()

获取当前实例的 TypeGets the Type of the current instance.

(Inherited from Object)
MemberwiseClone()

创建当前 Object 的浅表副本。Creates a shallow copy of the current Object.

(Inherited from Object)
ToString()

返回表示当前对象的字符串。Returns a string that represents the current object.

(Inherited from Object)

Applies to