Activity 类
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
注意
The System.Workflow.* types are deprecated. Instead, please use the new types from System.Activities.*
表示工作流的基本构建基块。 Activity 是所有活动的基类。
public ref class Activity : System::Workflow::ComponentModel::DependencyObject
[System.Drawing.ToolboxBitmap(typeof(System.Workflow.ComponentModel.Activity), "Design.Resources.Activity.png")]
[System.Workflow.ComponentModel.Compiler.ActivityCodeGenerator(typeof(System.Workflow.ComponentModel.Compiler.ActivityCodeGenerator))]
[System.Workflow.ComponentModel.Compiler.ActivityValidator(typeof(System.Workflow.ComponentModel.Compiler.ActivityValidator))]
[System.Workflow.ComponentModel.Serialization.RuntimeNameProperty("Name")]
public class Activity : System.Workflow.ComponentModel.DependencyObject
[System.Drawing.ToolboxBitmap(typeof(System.Workflow.ComponentModel.Activity), "Design.Resources.Activity.png")]
[System.Workflow.ComponentModel.Compiler.ActivityCodeGenerator(typeof(System.Workflow.ComponentModel.Compiler.ActivityCodeGenerator))]
[System.Workflow.ComponentModel.Compiler.ActivityValidator(typeof(System.Workflow.ComponentModel.Compiler.ActivityValidator))]
[System.Workflow.ComponentModel.Serialization.RuntimeNameProperty("Name")]
[System.Obsolete("The System.Workflow.* types are deprecated. Instead, please use the new types from System.Activities.*")]
public class Activity : System.Workflow.ComponentModel.DependencyObject
[<System.Drawing.ToolboxBitmap(typeof(System.Workflow.ComponentModel.Activity), "Design.Resources.Activity.png")>]
[<System.Workflow.ComponentModel.Compiler.ActivityCodeGenerator(typeof(System.Workflow.ComponentModel.Compiler.ActivityCodeGenerator))>]
[<System.Workflow.ComponentModel.Compiler.ActivityValidator(typeof(System.Workflow.ComponentModel.Compiler.ActivityValidator))>]
[<System.Workflow.ComponentModel.Serialization.RuntimeNameProperty("Name")>]
type Activity = class
inherit DependencyObject
[<System.Drawing.ToolboxBitmap(typeof(System.Workflow.ComponentModel.Activity), "Design.Resources.Activity.png")>]
[<System.Workflow.ComponentModel.Compiler.ActivityCodeGenerator(typeof(System.Workflow.ComponentModel.Compiler.ActivityCodeGenerator))>]
[<System.Workflow.ComponentModel.Compiler.ActivityValidator(typeof(System.Workflow.ComponentModel.Compiler.ActivityValidator))>]
[<System.Workflow.ComponentModel.Serialization.RuntimeNameProperty("Name")>]
[<System.Obsolete("The System.Workflow.* types are deprecated. Instead, please use the new types from System.Activities.*")>]
type Activity = class
inherit DependencyObject
Public Class Activity
Inherits DependencyObject
- 继承
- 派生
- 属性
注解
注释
此材料讨论已过时的类型和命名空间。 有关详细信息,请参阅 Windows Workflow Foundation 4.50 中的
这是 Activity 工作流的基本构建基块。 定义 Activity 一组属性和事件,例如任何类,以及定义活动的运行时行为的执行逻辑。 一组附加组件可以与一个 Activity. 这些内容包括但不限于验证程序、代码生成器、自定义序列化程序和设计器。
所有活动共享在基类上 Activity 定义的通用属性集。 每个 Activity 属性都可以根据自己的要求声明自己的附加属性,方法是扩展此类。 由于 Activity 派生自 DependencyObject,因此可以将属性定义为标准 CLR 属性和依赖项属性。
实现任何Activity与工作流运行时之间存在的协定的执行逻辑Activity。 必须记录任何 Activity 功能意义上的执行逻辑,以便使用其行为方式的 Activity 工作流开发人员。 执行逻辑本身在工作流开发人员中隐藏,其中包括工作流中的活动,因为执行逻辑是工作流运行时和工作流运行时之间严格存在的协定的 Activity一部分。
构造函数
| 名称 | 说明 |
|---|---|
| Activity() |
已过时.
初始化 Activity 类的新实例。 |
| Activity(String) |
已过时.
|
字段
| 名称 | 说明 |
|---|---|
| ActivityContextGuidProperty |
已过时.
表示 DependencyPropertyGuidActivityExecutionContext 与 . Activity. |
| CancelingEvent |
已过时.
表示 DependencyProperty 针对事件 Canceling 的目标。 |
| ClosedEvent |
已过时.
表示 DependencyProperty 针对事件 Closed 的目标。 |
| CompensatingEvent |
已过时.
表示 DependencyProperty 针对事件 Compensating 的目标。 |
| ExecutingEvent |
已过时.
表示 DependencyProperty 针对 Executing 执行活动时发生的事件。 |
| FaultingEvent |
已过时.
表示 DependencyProperty 事件的 Faulting 项。 |
| StatusChangedEvent |
已过时.
表示 DependencyProperty 针对事件 StatusChanged 的目标。 |
属性
| 名称 | 说明 |
|---|---|
| Description |
已过时.
获取或设置 Activity的用户定义说明。 |
| DesignMode |
已过时.
获取一个值,该值指示此实例是处于设计模式还是运行时模式。 (继承自 DependencyObject) |
| Enabled |
已过时.
获取或设置一个值,该值指示是否为执行和验证启用此实例。 |
| ExecutionResult |
已过时.
获取上次运行此实例的尝试 ActivityExecutionResult。 |
| ExecutionStatus |
已过时.
获取此实例的当前 ActivityExecutionStatus。 |
| IsDynamicActivity |
已过时.
获取有关活动是否在工作流实例的默认 ActivityExecutionContext 内执行的信息。 |
| Name |
已过时.
获取或设置此实例的名称。 此名称必须符合工作流项目中使用的编程语言的变量命名约定。 |
| Parent |
已过时.
获取包含此 CompositeActivity的 Activity。 |
| ParentDependencyObject |
已过时.
获取 DependencyObject 图中的父 DependencyObject。 (继承自 DependencyObject) |
| QualifiedName |
已过时.
获取活动的限定名称。 限定的活动名称在工作流实例中始终是唯一的。 |
| Site |
已过时.
获取或设置对 SiteDependencyObject 组件的引用。 (继承自 DependencyObject) |
| UserData |
已过时.
获取将自定义数据与此类实例关联的 IDictionary。 (继承自 DependencyObject) |
| WorkflowInstanceId |
已过时.
获取与实例关联的 Guid。 |
方法
活动
| 名称 | 说明 |
|---|---|
| Canceling |
已过时.
取消活动执行时发生。 |
| Closed |
已过时.
当 Activity 完成执行时发生。 |
| Compensating |
已过时.
在 Activity上运行补偿方法时发生。 |
| Executing |
已过时.
运行 Activity 时发生。 |
| Faulting |
已过时.
在实例运行期间引发异常时发生。 |
| StatusChanged |
已过时.
当正在运行的 ActivityExecutionStatus 的 Activity 发生更改时发生。 |
显式接口实现
| 名称 | 说明 |
|---|---|
| IComponent.Disposed |
已过时.
表示处理组件的 Disposed 事件的方法。 (继承自 DependencyObject) |