TerminateActivity 类
定义
注意
The System.Workflow.* types are deprecated. Instead, please use the new types from System.Activities.*
出现不正常情况时,终止运行中的工作流实例。Terminates the running workflow instance when an abnormal situation occurs. 此类不能被继承。This class cannot be inherited.
public ref class TerminateActivity sealed : System::Workflow::ComponentModel::Activity
[System.Drawing.ToolboxBitmap(typeof(System.Workflow.ComponentModel.TerminateActivity), "Resources.Terminate.png")]
public sealed class TerminateActivity : System.Workflow.ComponentModel.Activity
[System.Drawing.ToolboxBitmap(typeof(System.Workflow.ComponentModel.TerminateActivity), "Resources.Terminate.png")]
[System.Obsolete("The System.Workflow.* types are deprecated. Instead, please use the new types from System.Activities.*")]
public sealed class TerminateActivity : System.Workflow.ComponentModel.Activity
[<System.Drawing.ToolboxBitmap(typeof(System.Workflow.ComponentModel.TerminateActivity), "Resources.Terminate.png")>]
type TerminateActivity = class
inherit Activity
[<System.Drawing.ToolboxBitmap(typeof(System.Workflow.ComponentModel.TerminateActivity), "Resources.Terminate.png")>]
[<System.Obsolete("The System.Workflow.* types are deprecated. Instead, please use the new types from System.Activities.*")>]
type TerminateActivity = class
inherit Activity
Public NotInheritable Class TerminateActivity
Inherits Activity
- 继承
- 属性
注解
备注
本材料讨论的类型和命名空间已废弃不用。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.
TerminateActivity 立即结束当前工作流实例的执行。TerminateActivity immediately ends the execution of the current workflow instance. 与挂起的工作流实例不同,终止的工作流实例不能再恢复。Unlike a suspended workflow instance, a terminated workflow instance can never be resumed.
构造函数
| TerminateActivity() |
初始化 TerminateActivity 类的新实例。Initializes a new instance of the TerminateActivity class. |
| TerminateActivity(String) |
使用活动名初始化 TerminateActivity 类的新实例。Initializes a new instance of the TerminateActivity class using the name of the activity. |
字段
| ErrorProperty |
表示针对 DependencyProperty 属性的 Error。Represents the DependencyProperty that targets the Error property. |
属性
| 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) |
| Error |
获取或设置向管理员报告的错误消息,其中提供终止的原因。Gets or sets an error message to report to administrators, providing the reason for termination. |
| ExecutionResult |
获取最后一次尝试运行此实例产生的 ActivityExecutionResult。Gets the ActivityExecutionResult of the last attempt to run this instance. (继承自 Activity) |
| ExecutionStatus |
获取此实例的当前 ActivityExecutionStatus。Gets 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 |
获取包含此 CompositeActivity 的 Activity。Gets the CompositeActivity that contains this Activity. (继承自 Activity) |
| ParentDependencyObject |
获取 DependencyObject 图中的父 DependencyObject。Gets 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 |
获取或设置对 Site 的 DependencyObject 组件的引用。Gets or sets a reference to the Site component of the DependencyObject. (继承自 DependencyObject) |
| UserData |
获取一个 IDictionary,它将自定义数据与此类实例关联。Gets an IDictionary that associates custom data with this class instance. (继承自 DependencyObject) |
| WorkflowInstanceId |
获取与实例关联的 Guid。Gets the Guid associated with the instance. (继承自 Activity) |
方法
| AddHandler(DependencyProperty, Object) |
为 DependencyObject 的事件添加处理程序。Adds a handler for an event of a DependencyObject. (继承自 DependencyObject) |
| 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) |
释放非托管资源,还可以释放由 DependencyObject 占用的托管资源。Releases the unmanaged resources and optionally releases the managed resources used by DependencyObject. (继承自 DependencyObject) |
| 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 下的所有活动的集(如果第二个参数为 |
| GetBinding(DependencyProperty) |
提供对与特定 ActivityBind 关联的 DependencyProperty 的访问。Provides access to the ActivityBind associated with the specific DependencyProperty. (继承自 DependencyObject) |
| GetBoundValue(ActivityBind, Type) |
检索作为 Object 的主题的 ActivityBind。Retrieves the Object that is the subject of an ActivityBind. (继承自 DependencyObject) |
| 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() |
获取当前实例的 Type。Gets 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. (继承自 Activity) |
| Initialize(IServiceProvider) |
由工作流运行时调用,用于在构造新的工作流实例期间初始化活动。Called by the workflow runtime to initialize an activity during the construction of a new workflow instance. 此方法在构造动态 ActivityExecutionContext 期间调用。This method is called during the construction of a dynamic ActivityExecutionContext. (继承自 Activity) |
| 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) |
确定此 |
| OnActivityExecutionContextLoad(IServiceProvider) |
每当加载 ActivityExecutionContext 时,由工作流运行时调用。Called by the workflow runtime whenever an ActivityExecutionContext is loaded. 例如,在创建 ActivityExecutionContext 期间,以及每次在从持久性存储区中加载工作流实例期间重建 ActivityExecutionContext 时,会调用此方法。For example, this method is called during the creation of an ActivityExecutionContext as well as every time the ActivityExecutionContext is reincarnated when a workflow instance is loaded from persistent storage. (继承自 Activity) |
| OnActivityExecutionContextUnload(IServiceProvider) |
每当卸载 ActivityExecutionContext 时,由工作流运行时调用。Called by the workflow runtime whenever an ActivityExecutionContext is unloaded. 例如,在完成 ActivityExecutionContext 期间,以及每次在保留工作流实例期间卸载 ActivityExecutionContext 时,会调用此方法。For example, this method is called during completion of an ActivityExecutionContext as well as every time the ActivityExecutionContext is unloaded when a workflow instance is persisted. (继承自 Activity) |
| OnClosed(IServiceProvider) |
作为活动向 Closed 状态转换的一部分,由工作流运行时调用。Called by the workflow runtime as part of the activity's transition to the closed state. (继承自 Activity) |
| RaiseEvent(DependencyProperty, Object, EventArgs) |
引发与指定依赖属性关联的 Event。Raises 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>) |
为状态更改事件注册指定的 DependencyProperty。Registers the specified DependencyProperty for the status change event. (继承自 Activity) |
| RemoveHandler(DependencyProperty, Object) |
从关联的 EventHandler 中移除 DependencyProperty。Removes an EventHandler from an associated DependencyProperty. (继承自 DependencyObject) |
| RemoveProperty(DependencyProperty) |
从 DependencyProperty 中移除 DependencyObject。Removes a DependencyProperty from the DependencyObject. (继承自 DependencyObject) |
| Save(Stream) |
将 Activity 写入到 Stream 以便进行保留。Writes the Activity to a Stream for persistence. (继承自 Activity) |
| Save(Stream, IFormatter) |
使用为序列化提供的自定义 Activity 将 Stream 写入到 IFormatter,以便进行保留。Writes the Activity to a Stream for persistence using the custom IFormatter provided for serialization. (继承自 Activity) |
| SetBinding(DependencyProperty, ActivityBind) |
为指定的 ActivityBind 设置 DependencyProperty。Sets 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) |
当在派生类中重写时,为活动提供由服务提供程序执行的反初始化。When overridden in a derived class, provides un-initialization by a service provider for the activity. (继承自 Activity) |
| UnregisterForStatusChange(DependencyProperty, IActivityEventListener<ActivityExecutionStatusChangedEventArgs>) |
注销状态更改事件的指定 DependencyProperty。Un-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 |
在运行中的 ActivityExecutionStatus 的 Activity 更改时发生。Occurs when the ActivityExecutionStatus of a running Activity changes. (继承自 Activity) |
显式接口实现
| IComponent.Disposed |
表示处理组件的“Disposed”事件的方法。Represents the method that handles the Disposed event of a component. (继承自 DependencyObject) |