ListenActivity 类
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
注意
The System.Workflow.* types are deprecated. Instead, please use the new types from System.Activities.*
在活动继续前使工作流等待多个可能事件中的任何一个事件发生。 此类不能被继承。
public ref class ListenActivity sealed : System::Workflow::ComponentModel::CompositeActivity, System::Workflow::ComponentModel::IActivityEventListener<System::Workflow::ComponentModel::ActivityExecutionStatusChangedEventArgs ^>
[System.Drawing.ToolboxBitmap(typeof(System.Workflow.Activities.ListenActivity), "Resources.Listen.png")]
[System.Workflow.ComponentModel.Compiler.ActivityValidator(typeof(System.Workflow.Activities.ListenValidator))]
public sealed class ListenActivity : System.Workflow.ComponentModel.CompositeActivity, System.Workflow.ComponentModel.IActivityEventListener<System.Workflow.ComponentModel.ActivityExecutionStatusChangedEventArgs>
[System.Drawing.ToolboxBitmap(typeof(System.Workflow.Activities.ListenActivity), "Resources.Listen.png")]
[System.Workflow.ComponentModel.Compiler.ActivityValidator(typeof(System.Workflow.Activities.ListenValidator))]
[System.Obsolete("The System.Workflow.* types are deprecated. Instead, please use the new types from System.Activities.*")]
public sealed class ListenActivity : System.Workflow.ComponentModel.CompositeActivity, System.Workflow.ComponentModel.IActivityEventListener<System.Workflow.ComponentModel.ActivityExecutionStatusChangedEventArgs>
[<System.Drawing.ToolboxBitmap(typeof(System.Workflow.Activities.ListenActivity), "Resources.Listen.png")>]
[<System.Workflow.ComponentModel.Compiler.ActivityValidator(typeof(System.Workflow.Activities.ListenValidator))>]
type ListenActivity = class
inherit CompositeActivity
interface IActivityEventListener<ActivityExecutionStatusChangedEventArgs>
[<System.Drawing.ToolboxBitmap(typeof(System.Workflow.Activities.ListenActivity), "Resources.Listen.png")>]
[<System.Workflow.ComponentModel.Compiler.ActivityValidator(typeof(System.Workflow.Activities.ListenValidator))>]
[<System.Obsolete("The System.Workflow.* types are deprecated. Instead, please use the new types from System.Activities.*")>]
type ListenActivity = class
inherit CompositeActivity
interface IActivityEventListener<ActivityExecutionStatusChangedEventArgs>
Public NotInheritable Class ListenActivity
Inherits CompositeActivity
Implements IActivityEventListener(Of ActivityExecutionStatusChangedEventArgs)
- 继承
- 属性
- 实现
注解
注意
本材料讨论的类型和命名空间已废弃不用。 有关详细信息,请参阅 Windows Workflow Foundation 4.5 中弃用的类型。
ListenActivity 是一种 CompositeActivity,这意味着 ListenActivity 可以包含其他活动。 ListenActivity 只能包含 EventDrivenActivity 活动,并且至少必须有两个子活动。
ListenActivity 可能包含许多分支,每个分支都要等待特定事件发生后才运行。 每个分支都是事件驱动的,并且发生的事件将先运行对应的分支。 所有其他分支会取消并停止侦听事件。
ListenActivity 无法用于状态机工作流中。
构造函数
ListenActivity() |
已过时.
初始化 ListenActivity 类的新实例。 |
ListenActivity(String) |
已过时.
使用活动名初始化 ListenActivity 类的新实例。 |
属性
方法
事件
Canceling |
已过时.
在取消活动执行时发生。 (继承自 Activity) |
Closed |
已过时.
在 Activity 完成执行时发生。 (继承自 Activity) |
Compensating |
已过时.
在 Activity 上运行补偿方法时发生。 (继承自 Activity) |
Executing |
已过时.
在运行 Activity 时发生。 (继承自 Activity) |
Faulting |
已过时.
在实例的运行期间引发异常时发生。 (继承自 Activity) |
StatusChanged |
已过时.
在运行中的 ActivityExecutionStatus 的 Activity 更改时发生。 (继承自 Activity) |
显式接口实现
IActivityEventListener<ActivityExecutionStatusChangedEventArgs>.OnEvent(Object, ActivityExecutionStatusChangedEventArgs) |
已过时.
定义发生订阅事件时的处理过程。 |
IComponent.Disposed |
已过时.
表示处理组件的“Disposed”事件的方法。 (继承自 DependencyObject) |
适用于
另请参阅
反馈
https://aka.ms/ContentUserFeedback。
即将发布:在整个 2024 年,我们将逐步淘汰作为内容反馈机制的“GitHub 问题”,并将其取代为新的反馈系统。 有关详细信息,请参阅:提交和查看相关反馈