StateMachineWorkflowInstance 類別

定義

警告

The System.Workflow.* types are deprecated. Instead, please use the new types from System.Activities.*

表示類別,這個類別可管理 StateMachineWorkflowActivity 的目前執行個體。 此類別無法獲得繼承。

public ref class StateMachineWorkflowInstance sealed
public sealed class StateMachineWorkflowInstance
[System.Obsolete("The System.Workflow.* types are deprecated.  Instead, please use the new types from System.Activities.*")]
public sealed class StateMachineWorkflowInstance
type StateMachineWorkflowInstance = class
[<System.Obsolete("The System.Workflow.* types are deprecated.  Instead, please use the new types from System.Activities.*")>]
type StateMachineWorkflowInstance = class
Public NotInheritable Class StateMachineWorkflowInstance
繼承
StateMachineWorkflowInstance
屬性

備註

注意

此資料討論已被汰換的類型及命名空間。 如需詳細資訊,請參閱 Windows Workflow Foundation 4.5 中即將淘汰的類型

這個類別也在 StateMachineWorkflowActivity 的目前執行個體上提供查詢介面。 透過使用這個類別的執行個體,您可以在 StateMachineWorkflowInstance 上進行各種查詢。

以下為可進行的典型查詢:

  • 狀態機器的目前狀態。

  • 從目前狀態的可能轉換。

  • 狀態機器執行個體的轉換記錄。

  • 列舉狀態機器中的所有狀態。

建構函式

StateMachineWorkflowInstance(WorkflowRuntime, Guid)

初始化 StateMachineWorkflowInstance 類別的新執行個體。

屬性

CurrentState

取得目前執行的 StateActivity

CurrentStateName

取得目前 StateActivity 的名稱。

InstanceId

取得 Guid,此物件會指出 StateMachineWorkflowActivity 的目前執行個體。

PossibleStateTransitions

取得目前 StateActivity 可進行的狀態轉換集合。

StateHistory

取得狀態活動集合,狀態機器工作流程執行個體已透過這些活動進行轉換。

StateMachineWorkflow

取得 StateMachineWorkflowActivity 的最新定義。

States

取得 StateActivity 中的 StateMachineWorkflow 類別清單。

WorkflowInstance

取得目前的 WorkflowInstance

方法

EnqueueItem(IComparable, Object)

將訊息張貼到 StateMachineWorkflowInstance

EnqueueItem(IComparable, Object, IPendingWork, Object)

將訊息張貼到 StateMachineWorkflowInstance

Equals(Object)

判斷指定的物件是否等於目前的物件。

(繼承來源 Object)
GetHashCode()

做為預設雜湊函式。

(繼承來源 Object)
GetType()

取得目前執行個體的 Type

(繼承來源 Object)
MemberwiseClone()

建立目前 Object 的淺層複製。

(繼承來源 Object)
SetState(StateActivity)

提供指定之 的轉換。

SetState(String)

使用 的名稱,提供指定之 的轉換。

ToString()

傳回代表目前物件的字串。

(繼承來源 Object)

適用於