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
- 繼承
- 衍生
- 屬性
備註
Note
此數據會討論已過時的類型和命名空間。 欲了解更多資訊,請參閱 Windows Workflow Foundation 4.5 中的
An Activity 是工作流程的基本建構組件。 An Activity 定義一組屬性與事件,例如任何類別,以及定義該活動執行時行為的執行邏輯。 一組額外的元件可以與 相關聯。Activity 這些包括但不限於驗證器、程式碼產生器、自訂序列化器以及設計器。
所有活動共享基 Activity 底類別定義的共同屬性集合。 每個類別 Activity 可依其需求宣告額外性質,透過擴充此類別。 由於 Activity 源自 DependencyObject,屬性可定義為標準 CLR 性質與依賴性質。
執行 Activity 邏輯滿足了與工作流程 Activity 執行時間之間的契約。 你必須以功能層面記錄任何 Activity 執行邏輯,讓使用該 Activity 流程的開發者知道它的行為。 執行邏輯本身對工作流開發者隱藏,因為執行邏輯是工作流執行時 Activity與 . 之間嚴格存在的合約的一部分。
建構函式
| 名稱 | Description |
|---|---|
| Activity() |
已淘汰.
初始化 Activity 類別的新執行個體。 |
| Activity(String) |
已淘汰.
|
欄位
| 名稱 | Description |
|---|---|
| ActivityContextGuidProperty |
已淘汰.
該DependencyProperty代表GuidActivityExecutionContext與 相關聯Activity的 。 |
| CancelingEvent |
已淘汰.
代表針對該DependencyProperty事件的目標Canceling。 |
| ClosedEvent |
已淘汰.
代表針對該DependencyProperty事件的目標Closed。 |
| CompensatingEvent |
已淘汰.
代表針對該DependencyProperty事件的目標Compensating。 |
| ExecutingEvent |
已淘汰.
代表針對DependencyProperty該事件的 ,Executing該事件發生於執行該活動時。 |
| FaultingEvent |
已淘汰.
|
| StatusChangedEvent |
已淘汰.
代表針對該DependencyProperty事件的目標StatusChanged。 |
屬性
| 名稱 | Description |
|---|---|
| Description |
已淘汰.
取得或設定 Activity的使用者定義描述。 |
| DesignMode |
已淘汰.
取得值,這個值表示這個實例處於設計或運行時間模式。 (繼承來源 DependencyObject) |
| Enabled |
已淘汰.
取得或設定值,這個值表示是否啟用這個實例來執行和驗證。 |
| ExecutionResult |
已淘汰.
取得上次執行這個實例之嘗試 ActivityExecutionResult。 |
| ExecutionStatus |
已淘汰.
取得這個實例目前的 ActivityExecutionStatus。 |
| IsDynamicActivity |
已淘汰.
取得活動是否在工作流程實例的預設 ActivityExecutionContext 內執行的相關信息。 |
| Name |
已淘汰.
取得或設定這個實例的名稱。 此名稱必須符合工作流程專案中所使用之程式設計語言的變數命名慣例。 |
| Parent |
已淘汰.
取得包含這個 CompositeActivity的 Activity。 |
| ParentDependencyObject |
已淘汰.
取得 DependencyObject 圖形中的父 DependencyObject。 (繼承來源 DependencyObject) |
| QualifiedName |
已淘汰.
取得活動的限定名稱。 限定的活動名稱在工作流程實例中一律是唯一的。 |
| Site |
已淘汰.
取得或設定 Site之 DependencyObject 元件的參考。 (繼承來源 DependencyObject) |
| UserData |
已淘汰.
取得將自定義數據與這個類別實例產生關聯的 IDictionary。 (繼承來源 DependencyObject) |
| WorkflowInstanceId |
已淘汰.
取得與 實例相關聯的 Guid。 |
方法
事件
| 名稱 | Description |
|---|---|
| Canceling |
已淘汰.
發生於取消活動執行時。 |
| Closed |
已淘汰.
發生於 Activity 已完成執行時。 |
| Compensating |
已淘汰.
在 Activity上執行補償方法時發生。 |
| Executing |
已淘汰.
執行 Activity 時發生。 |
| Faulting |
已淘汰.
在實例執行期間引發例外狀況時發生。 |
| StatusChanged |
已淘汰.
發生於執行中 ActivityExecutionStatus 的 Activity 變更時。 |
明確介面實作
| 名稱 | Description |
|---|---|
| IComponent.Disposed |
已淘汰.
表示處理元件 Disposed 事件的方法。 (繼承來源 DependencyObject) |