EventDrivenActivity 类
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
注意
The System.Workflow.* types are deprecated. Instead, please use the new types from System.Activities.*
包装 Activity 由事件初始化其执行。 无法继承此类。
public ref class EventDrivenActivity sealed : System::Workflow::Activities::SequenceActivity
[System.Drawing.ToolboxBitmap(typeof(System.Workflow.Activities.EventDrivenActivity), "Resources.EventDriven.png")]
[System.Workflow.ComponentModel.Compiler.ActivityValidator(typeof(System.Workflow.Activities.EventDrivenValidator))]
public sealed class EventDrivenActivity : System.Workflow.Activities.SequenceActivity
[System.Drawing.ToolboxBitmap(typeof(System.Workflow.Activities.EventDrivenActivity), "Resources.EventDriven.png")]
[System.Workflow.ComponentModel.Compiler.ActivityValidator(typeof(System.Workflow.Activities.EventDrivenValidator))]
[System.Obsolete("The System.Workflow.* types are deprecated. Instead, please use the new types from System.Activities.*")]
public sealed class EventDrivenActivity : System.Workflow.Activities.SequenceActivity
[<System.Drawing.ToolboxBitmap(typeof(System.Workflow.Activities.EventDrivenActivity), "Resources.EventDriven.png")>]
[<System.Workflow.ComponentModel.Compiler.ActivityValidator(typeof(System.Workflow.Activities.EventDrivenValidator))>]
type EventDrivenActivity = class
inherit SequenceActivity
[<System.Drawing.ToolboxBitmap(typeof(System.Workflow.Activities.EventDrivenActivity), "Resources.EventDriven.png")>]
[<System.Workflow.ComponentModel.Compiler.ActivityValidator(typeof(System.Workflow.Activities.EventDrivenValidator))>]
[<System.Obsolete("The System.Workflow.* types are deprecated. Instead, please use the new types from System.Activities.*")>]
type EventDrivenActivity = class
inherit SequenceActivity
Public NotInheritable Class EventDrivenActivity
Inherits SequenceActivity
- 继承
- 属性
注解
注释
此材料讨论已过时的类型和命名空间。 有关详细信息,请参阅 Windows Workflow Foundation 4.50 中的
它是一个 CompositeActivity 用于处理事件;通常,它可以从主机或运行时引发,以响应延迟计时器过期。 EventDrivenActivity 继承自 SequenceActivity;因此,它是具有第一个活动应为 IEventActivity附加限制的序列。
这是 EventDrivenActivity 一个 CompositeActivity,这意味着 EventDrivenActivity 可以包含其他活动。 这 EventDrivenActivity 类似于 SequenceActivity 活动,具有一些附加特征。
必须
活动的第一个 EventDrivenActivity 子级必须是继承自 IEventActivity的活动。 所有后续子级都可以是任何类型的活动。 阻止 IEventActivity 并等待某些事件的挂起出现,例如启动计时器或消息到达。 事件发生时,完成 IEventActivity 运行,然后执行所有后续活动。
StateMachineWorkflowActivity如果包含一个EventDrivenActivity,则EventDrivenActivity存在一些限制:
该 EventDrivenActivity 类型可能包含一个,并且只有一个类型 IEventActivity的活动。
必须是 HandleExternalEventActivity 第一个子活动。 不能HandleExternalEventActivity位于子活动的事件处理程序中,并且不能是第一个子活动的子EventDrivenActivityHandleExternalEventActivity级。
只要第一个活动是 HandleExternalEventActivity活动,事件处理程序就可以包含任何活动。 如果活动 HandleExternalEventActivity 不包含在内 EventDrivenActivity,则该活动不能有事件处理程序。
例如,支持事件处理的活动可以在内部 EventDrivenActivity 使用,但活动不能将事件处理程序附加到自身。
另一个示例是 EventDrivenActivity 可以包含 a ConditionedActivityGroup,但 ConditionedActivityGroup 本身不能包含任何 HandleExternalEventActivity 类。
构造函数
| 名称 | 说明 |
|---|---|
| EventDrivenActivity() |
已过时.
初始化 EventDrivenActivity 类的新实例。 |
| EventDrivenActivity(String) |
已过时.
使用活动的名称初始化 EventDrivenActivity 类的新实例。 |
属性
方法
活动
| 名称 | 说明 |
|---|---|
| Canceling |
已过时.
取消活动执行时发生。 (继承自 Activity) |
| Closed |
已过时.
当 Activity 完成执行时发生。 (继承自 Activity) |
| Compensating |
已过时.
在 Activity上运行补偿方法时发生。 (继承自 Activity) |
| Executing |
已过时.
运行 Activity 时发生。 (继承自 Activity) |
| Faulting |
已过时.
在实例运行期间引发异常时发生。 (继承自 Activity) |
| StatusChanged |
已过时.
当正在运行的 ActivityExecutionStatus 的 Activity 发生更改时发生。 (继承自 Activity) |
显式接口实现
| 名称 | 说明 |
|---|---|
| IActivityEventListener<ActivityExecutionStatusChangedEventArgs>.OnEvent(Object, ActivityExecutionStatusChangedEventArgs) |
已过时.
定义订阅事件发生时的处理过程。 (继承自 SequenceActivity) |
| IComponent.Disposed |
已过时.
表示处理组件的 Disposed 事件的方法。 (继承自 DependencyObject) |