CompensatableTransactionScopeActivity 类

定义

注意

The System.Workflow.* types are deprecated. Instead, please use the new types from System.Activities.*

定义 TransactionScopeActivity 活动的可补偿版本。Defines a compensatable version of the TransactionScopeActivity activity. 此类不能被继承。This class cannot be inherited.

public ref class CompensatableTransactionScopeActivity sealed : System::Workflow::ComponentModel::CompositeActivity, System::Workflow::ComponentModel::IActivityEventListener<System::Workflow::ComponentModel::ActivityExecutionStatusChangedEventArgs ^>, System::Workflow::ComponentModel::ICompensatableActivity
[System.Drawing.ToolboxBitmap(typeof(System.Workflow.ComponentModel.CompensatableTransactionScopeActivity), "Resources.Sequence.png")]
[System.Workflow.ComponentModel.PersistOnClose]
public sealed class CompensatableTransactionScopeActivity : System.Workflow.ComponentModel.CompositeActivity, System.Workflow.ComponentModel.IActivityEventListener<System.Workflow.ComponentModel.ActivityExecutionStatusChangedEventArgs>, System.Workflow.ComponentModel.ICompensatableActivity
[System.Drawing.ToolboxBitmap(typeof(System.Workflow.ComponentModel.CompensatableTransactionScopeActivity), "Resources.Sequence.png")]
[System.Workflow.ComponentModel.PersistOnClose]
[System.Obsolete("The System.Workflow.* types are deprecated.  Instead, please use the new types from System.Activities.*")]
public sealed class CompensatableTransactionScopeActivity : System.Workflow.ComponentModel.CompositeActivity, System.Workflow.ComponentModel.IActivityEventListener<System.Workflow.ComponentModel.ActivityExecutionStatusChangedEventArgs>, System.Workflow.ComponentModel.ICompensatableActivity
[<System.Drawing.ToolboxBitmap(typeof(System.Workflow.ComponentModel.CompensatableTransactionScopeActivity), "Resources.Sequence.png")>]
[<System.Workflow.ComponentModel.PersistOnClose>]
type CompensatableTransactionScopeActivity = class
    inherit CompositeActivity
    interface IActivityEventListener<ActivityExecutionStatusChangedEventArgs>
    interface ICompensatableActivity
[<System.Drawing.ToolboxBitmap(typeof(System.Workflow.ComponentModel.CompensatableTransactionScopeActivity), "Resources.Sequence.png")>]
[<System.Workflow.ComponentModel.PersistOnClose>]
[<System.Obsolete("The System.Workflow.* types are deprecated.  Instead, please use the new types from System.Activities.*")>]
type CompensatableTransactionScopeActivity = class
    inherit CompositeActivity
    interface IActivityEventListener<ActivityExecutionStatusChangedEventArgs>
    interface ICompensatableActivity
Public NotInheritable Class CompensatableTransactionScopeActivity
Inherits CompositeActivity
Implements IActivityEventListener(Of ActivityExecutionStatusChangedEventArgs), ICompensatableActivity
继承
CompensatableTransactionScopeActivity
属性
实现

注解

备注

本材料讨论的类型和命名空间已废弃不用。This material discusses types and namespaces that are obsolete. 有关详细信息,请参阅 Windows Workflow Foundation 4.5 中弃用的类型For more information, see Deprecated Types in Windows Workflow Foundation 4.5.

CompensatableTransactionScopeActivity 实现 ICompensatableActivity 接口。CompensatableTransactionScopeActivity implements the ICompensatableActivity interface.

构造函数

CompensatableTransactionScopeActivity()

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

CompensatableTransactionScopeActivity(String)

使用活动名初始化 CompensatableTransactionScopeActivity 类的新实例。Initializes a new instance of the CompensatableTransactionScopeActivity class using the name of the activity.

属性

Activities

获取表示所有子活动的集合 ActivityCollection 的对象。Gets the object representing the collection, ActivityCollection, of all child activities.

(继承自 CompositeActivity)
CanModifyActivities

获取或设置一个值,该值控制是否可以修改 Activities 中的单个活动。Gets or sets a value which controls whether the individual activities within Activities can be modified.

(继承自 CompositeActivity)
Description

获取或设置 Activity 的用户定义说明。Gets or sets the user-defined description of the Activity.

(继承自 Activity)
DesignMode

获取一个值,该值指示此实例是处于设计模式还是运行时模式。Gets the value that indicates whether this instance is in design or run-time mode.

(继承自 DependencyObject)
Enabled

获取或设置一个值,该值指示是否启用此实例以供执行和验证。Gets or sets a value that indicates whether this instance is enabled for execution and validation.

(继承自 Activity)
EnabledActivities

获取表示已启用的 Activities 的子集的只读集合。Gets the read-only collection that represents the subset of Activities that are enabled.

(继承自 CompositeActivity)
ExecutionResult

获取最后一次尝试运行此实例产生的 ActivityExecutionResultGets the ActivityExecutionResult of the last attempt to run this instance.

(继承自 Activity)
ExecutionStatus

获取此实例的当前 ActivityExecutionStatusGets the current ActivityExecutionStatus of this instance.

(继承自 Activity)
IsDynamicActivity

获取有关活动是否在工作流实例的默认 ActivityExecutionContext 中执行的信息。Gets information about whether the activity is executing within the default ActivityExecutionContext of the workflow instance.

(继承自 Activity)
Name

获取或设置此实例的名称。Gets or sets the name of this instance. 此名称必须符合工作流项目中使用的编程语言的变量命名规则。This name must conform to the variable naming convention of the programming language that is being used in the Workflow project.

(继承自 Activity)
Parent

获取包含此 CompositeActivityActivityGets the CompositeActivity that contains this Activity.

(继承自 Activity)
ParentDependencyObject

获取 DependencyObject 图中的父 DependencyObjectGets the parent DependencyObject in the DependencyObject graph.

(继承自 DependencyObject)
QualifiedName

获取活动的限定名。Gets the qualified name of the activity. 活动的限定名在工作流实例中始终是唯一的。Qualified activity names are always unique in a workflow instance.

(继承自 Activity)
Site

获取或设置对 SiteDependencyObject 组件的引用。Gets or sets a reference to the Site component of the DependencyObject.

(继承自 DependencyObject)
TransactionOptions

获取与此实例关联的 WorkflowTransactionOptionsGets the WorkflowTransactionOptions associated with this instance.

UserData

获取一个 IDictionary,它将自定义数据与此类实例关联。Gets an IDictionary that associates custom data with this class instance.

(继承自 DependencyObject)
WorkflowInstanceId

获取与实例关联的 GuidGets the Guid associated with the instance.

(继承自 Activity)

方法

AddHandler(DependencyProperty, Object)

DependencyObject 的事件添加处理程序。Adds a handler for an event of a DependencyObject.

(继承自 DependencyObject)
ApplyWorkflowChanges(WorkflowChanges)

将参数中的 WorkflowChanges 清单应用到此实例。Applies the WorkflowChanges manifest in the parameter to this instance.

(继承自 CompositeActivity)
Cancel(ActivityExecutionContext)

由工作流运行时调用,用于取消当前正在运行的活动执行。Called by the workflow runtime to cancel execution of an activity that is currently executing.

(继承自 Activity)
Clone()

创建 Activity 的深层副本。Creates a deep copy of the Activity.

(继承自 Activity)
Dispose()

释放由 DependencyObject 占用的所有资源。Releases all the resources used by the DependencyObject.

(继承自 DependencyObject)
Dispose(Boolean)

在此实例上调用 Dispose(Boolean),并可以选择在此实例的所有子活动上调用 Dispose()Calls Dispose(Boolean) on this instance, and optionally calls Dispose() on all child activities of this instance.

(继承自 CompositeActivity)
Equals(Object)

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

(继承自 Object)
Execute(ActivityExecutionContext)

由工作流运行时调用,用于执行活动。Called by the workflow runtime to execute an activity.

(继承自 Activity)
GetActivityByName(String)

返回 Activity 的实例,其名称由此实例的根活动下(即在工作流中)运行的所有活动的集请求。Returns the instance of the Activity whose name is requested from the set of all activities running under the root activity of this instance, which is within the workflow.

(继承自 Activity)
GetActivityByName(String, Boolean)

返回 Activity 的实例,其名称被此实例的根 Activity 下的所有活动的集(如果第二个参数为 false)和当前 Activity 下的所有活动的集(如果第二个参数为 true)请求。Returns the instance of the Activity whose name is requested from the set of all activities under the root the Activity of this instance if the second parameter is false and under the current Activity if the second parameter is true.

(继承自 Activity)
GetBinding(DependencyProperty)

提供对与特定 ActivityBind 关联的 DependencyProperty 的访问。Provides access to the ActivityBind associated with the specific DependencyProperty.

(继承自 DependencyObject)
GetBoundValue(ActivityBind, Type)

检索作为 Object 的主题的 ActivityBindRetrieves the Object that is the subject of an ActivityBind.

(继承自 DependencyObject)
GetDynamicActivities(Activity)

返回包含指定活动的所有当前正在执行的实例的数组。Returns an array that contains all of the currently executing instances of the specified activity.

(继承自 CompositeActivity)
GetHashCode()

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

(继承自 Object)
GetInvocationList<T>(DependencyProperty)

获取一个数组,其中包含指定的 DependencyProperty 的委托。Gets an array that contains the delegates for the specified DependencyProperty.

(继承自 DependencyObject)
GetType()

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

(继承自 Object)
GetValue(DependencyProperty)

提供对指定的 DependencyProperty 的值的访问。Provides access to the value of the designated DependencyProperty.

(继承自 DependencyObject)
GetValueBase(DependencyProperty)

提供对 DependencyProperty 的绑定对象的访问,并跳过 GetValue(DependencyProperty) 重写。Provides access to the bound object of a DependencyProperty and bypasses the GetValue(DependencyProperty) override.

(继承自 DependencyObject)
HandleFault(ActivityExecutionContext, Exception)

此实例的执行上下文中引发了异常时调用。Called when an exception is raised within the context of the execution of this instance.

(继承自 CompositeActivity)
Initialize(IServiceProvider)

初始化此实例的所有适当的子活动和指定的 IServiceProviderInitializes all appropriate child activities of this instance and the specified IServiceProvider.

(继承自 CompositeActivity)
InitializeProperties()

在派生类中重写时,对依赖属性执行初始化。Performs initialization on dependency properties when overridden in a derived class.

(继承自 DependencyObject)
Invoke<T>(EventHandler<T>, T)

订阅 EventHandler 并调用该委托。Subscribes an EventHandler and invokes that delegate.

(继承自 Activity)
Invoke<T>(IActivityEventListener<T>, T)

订阅 IActivityEventListener<T> 并调用该委托。Subscribes an IActivityEventListener<T> and invokes that delegate.

(继承自 Activity)
IsBindingSet(DependencyProperty)

指示 DependencyProperty 的值是否设置为绑定。Indicates whether the value of a DependencyProperty is set as a binding. 请参阅 SetBinding(DependencyProperty, ActivityBind)See SetBinding(DependencyProperty, ActivityBind).

(继承自 DependencyObject)
MemberwiseClone()

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

(继承自 Object)
MetaEquals(DependencyObject)

确定此 metapropertiesDependencyObject 是否等于参数化的 metapropertiesDependencyObjectDetermines whether the metaproperties of this DependencyObject equals the metaproperties of the parameterized DependencyObject.

(继承自 DependencyObject)
OnActivityChangeAdd(ActivityExecutionContext, Activity)

在添加活动时调用。Calls when an activity is added.

(继承自 CompositeActivity)
OnActivityChangeRemove(ActivityExecutionContext, Activity)

移除活动时调用。Called when an activity is removed.

(继承自 CompositeActivity)
OnActivityExecutionContextLoad(IServiceProvider)

每次加载此活动的 ActivityExecutionContext 时由工作流运行时引擎调用。Called by the workflow runtime engine every time the ActivityExecutionContext for this activity is loaded.

(继承自 CompositeActivity)
OnActivityExecutionContextUnload(IServiceProvider)

每次卸载此活动的 ActivityExecutionContext 时由工作流运行时引擎调用。Called by the workflow runtime engine every time the ActivityExecutionContext for this activity is unloaded.

(继承自 CompositeActivity)
OnClosed(IServiceProvider)

作为活动向 Closed 状态转换的一部分,由工作流运行时调用。Called by the workflow runtime as part of the activity's transition to the closed state.

(继承自 Activity)
OnListChanged(ActivityCollectionChangeEventArgs)

Activities 属性发生更改时,执行附加处理。Performs additional processing when the Activities property changes.

(继承自 CompositeActivity)
OnListChanging(ActivityCollectionChangeEventArgs)

在对基础 Activities 进行更改之前发生的事件。Event that occurs before a change being made to the underlying Activities.

(继承自 CompositeActivity)
OnWorkflowChangesCompleted(ActivityExecutionContext)

对此实例的集合 Activities 进行更改之后调用。Called after changes have been made to the collection Activities of this instance.

(继承自 CompositeActivity)
RaiseEvent(DependencyProperty, Object, EventArgs)

引发与指定依赖属性关联的 EventRaises an Event associated with the specified dependency property.

(继承自 Activity)
RaiseGenericEvent<T>(DependencyProperty, Object, T)

引发与引用的 DependencyProperty 关联的事件。Raises the event associated with the referenced DependencyProperty.

(继承自 Activity)
RegisterForStatusChange(DependencyProperty, IActivityEventListener<ActivityExecutionStatusChangedEventArgs>)

为状态更改事件注册指定的 DependencyPropertyRegisters the specified DependencyProperty for the status change event.

(继承自 Activity)
RemoveHandler(DependencyProperty, Object)

从关联的 EventHandler 中移除 DependencyPropertyRemoves an EventHandler from an associated DependencyProperty.

(继承自 DependencyObject)
RemoveProperty(DependencyProperty)

DependencyProperty 中移除 DependencyObjectRemoves a DependencyProperty from the DependencyObject.

(继承自 DependencyObject)
Save(Stream)

Activity 写入到 Stream 以便进行保留。Writes the Activity to a Stream for persistence.

(继承自 Activity)
Save(Stream, IFormatter)

使用为序列化提供的自定义 ActivityStream 写入到 IFormatter,以便进行保留。Writes the Activity to a Stream for persistence using the custom IFormatter provided for serialization.

(继承自 Activity)
SetBinding(DependencyProperty, ActivityBind)

为指定的 ActivityBind 设置 DependencyPropertySets the ActivityBind for the specified DependencyProperty.

(继承自 DependencyObject)
SetBoundValue(ActivityBind, Object)

设置目标 ActivityBind 的值。Sets the value of the target ActivityBind.

(继承自 DependencyObject)
SetReadOnlyPropertyValue(DependencyProperty, Object)

设置只读的 DependencyProperty 值。Sets the value of a DependencyProperty, which is read-only.

(继承自 DependencyObject)
SetValue(DependencyProperty, Object)

DependencyProperty 的值设置为对象。Sets the value of the DependencyProperty to the object.

(继承自 DependencyObject)
SetValueBase(DependencyProperty, Object)

通过跳过 DependencyProperty,将 Object 的值设置为指定的 SetValue(DependencyProperty, Object)Sets the value of the DependencyProperty to the specified Object, bypassing the SetValue(DependencyProperty, Object).

(继承自 DependencyObject)
ToString()

提供表示此实例的字符串。Provides a string that represents this instance.

(继承自 Activity)
TrackData(Object)

向运行时跟踪基础结构通知有关挂起跟踪的信息。Informs the run-time tracking infrastructure of pending tracking information.

(继承自 Activity)
TrackData(String, Object)

向运行时跟踪基础结构通知有关挂起跟踪的信息。Informs the run-time tracking infrastructure of pending tracking information.

(继承自 Activity)
Uninitialize(IServiceProvider)

当活动从 Closed 状态转换到 Initialized 状态时,由工作流运行时引擎调用。Called by the workflow runtime engine when an activity transitions into the Closed state from the Initialized state.

(继承自 CompositeActivity)
UnregisterForStatusChange(DependencyProperty, IActivityEventListener<ActivityExecutionStatusChangedEventArgs>)

注销状态更改事件的指定 DependencyPropertyUn-registers the specified DependencyProperty for the status change event.

(继承自 Activity)

事件

Canceling

在取消活动执行时发生。Occurs when the activity execution is canceled.

(继承自 Activity)
Closed

Activity 完成执行时发生。Occurs when an Activity has completed execution.

(继承自 Activity)
Compensating

Activity 上运行补偿方法时发生。Occurs when running a compensation method on the Activity.

(继承自 Activity)
Executing

在运行 Activity 时发生。Occurs when the Activity is run.

(继承自 Activity)
Faulting

在实例的运行期间引发异常时发生。Occurs when an exception is raised during the running of the instance.

(继承自 Activity)
StatusChanged

在运行中的 ActivityExecutionStatusActivity 更改时发生。Occurs when the ActivityExecutionStatus of a running Activity changes.

(继承自 Activity)

显式接口实现

IActivityEventListener<ActivityExecutionStatusChangedEventArgs>.OnEvent(Object, ActivityExecutionStatusChangedEventArgs)

定义发生订阅事件时的处理过程。Defines the processing procedure when the subscribed-to event occurs.

ICompensatableActivity.Compensate(ActivityExecutionContext)

由工作流运行时调用,用于补偿处于 Closed 状态的活动。Called by the workflow runtime to compensate an activity that is in the Closed state. 活动的 Succeeded 属性的值必须为 ExecutionResult,这样才能对其进行补偿。The activity must have a value of Succeeded for its ExecutionResult property in order to be compensatable.

IComponent.Disposed

表示处理组件的“Disposed”事件的方法。Represents the method that handles the Disposed event of a component.

(继承自 DependencyObject)

适用于

另请参阅