WorkflowUnhandledExceptionBehavior 类

定义

一种服务行为,可用于指定工作流服务中发生未经处理的异常时所采取的操作。A service behavior that enables you to specify the action to take when an unhandled exception occurs within a workflow service.

public ref class WorkflowUnhandledExceptionBehavior : System::ServiceModel::Description::IServiceBehavior
public class WorkflowUnhandledExceptionBehavior : System.ServiceModel.Description.IServiceBehavior
type WorkflowUnhandledExceptionBehavior = class
    interface IServiceBehavior
Public Class WorkflowUnhandledExceptionBehavior
Implements IServiceBehavior
继承
WorkflowUnhandledExceptionBehavior
实现

注解

当未在工作流中处理异常时,OnUnhandledExceptionWorkflowUnhandledExceptionBehavior 都将指示运行时的行为;但 WorkflowUnhandledExceptionBehavior 可以选择将已挂起的工作流保留在持久性存储区中,而 OnUnhandledException 无法做到这一点。Both OnUnhandledException and WorkflowUnhandledExceptionBehavior dictate the behavior of the runtime when an exception is not handled in the workflow; however, WorkflowUnhandledExceptionBehavior has the option of leaving a suspended workflow in the persistence store, while OnUnhandledException does not. 原因在于,对已挂起的工作流执行的操作是特定于宿主的,而 WorkflowApplication 则相反。The reason for this is that what happens to a suspended workflow is host-specific, and WorkflowApplication is not. 若要使用 WorkflowApplication 实现此功能,请创建一个具有此行为的自定义 PersistenceParticipantTo implement this functionality using WorkflowApplication, create a custom PersistenceParticipant that has this behavior.

有关如何使用此行为的示例,请参阅 工作流服务主机扩展性For an example of how to use this behavior see Workflow Service Host Extensibility.

构造函数

WorkflowUnhandledExceptionBehavior()

初始化 WorkflowUnhandledExceptionBehavior 类的新实例。Initializes a new instance of the WorkflowUnhandledExceptionBehavior class.

属性

Action

获取或设置出现未经处理的异常时采取的措施。Gets or sets the action to take when an unhandled exception occurs.

方法

AddBindingParameters(ServiceDescription, ServiceHostBase, Collection<ServiceEndpoint>, BindingParameterCollection)

实现 AddBindingParameters(ServiceDescription, ServiceHostBase, Collection<ServiceEndpoint>, BindingParameterCollection) 方法以支持该行为。Implements the AddBindingParameters(ServiceDescription, ServiceHostBase, Collection<ServiceEndpoint>, BindingParameterCollection) method to support the behavior.

ApplyDispatchBehavior(ServiceDescription, ServiceHostBase)

实现 ApplyDispatchBehavior(ServiceDescription, ServiceHostBase) 方法以支持该行为。Implements the ApplyDispatchBehavior(ServiceDescription, ServiceHostBase) method to support the behavior.

Equals(Object)

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

(继承自 Object)
GetHashCode()

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

(继承自 Object)
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)
Validate(ServiceDescription, ServiceHostBase)

实现 Validate(ServiceDescription, ServiceHostBase) 方法以支持该行为。Implements the Validate(ServiceDescription, ServiceHostBase) method to support the behavior.

适用于