共用方式為


WorkflowInstance.WorkflowRuntime 屬性

定義

取得此工作流程執行個體的 WorkflowRuntime

public:
 property System::Workflow::Runtime::WorkflowRuntime ^ WorkflowRuntime { System::Workflow::Runtime::WorkflowRuntime ^ get(); };
public System.Workflow.Runtime.WorkflowRuntime WorkflowRuntime { get; }
member this.WorkflowRuntime : System.Workflow.Runtime.WorkflowRuntime
Public ReadOnly Property WorkflowRuntime As WorkflowRuntime

屬性值

WorkflowRuntime

WorkflowRuntime,表示此工作流程執行個體執行時所在的執行環境。

範例

下列範例將示範如何存取 WorkflowRuntime 物件之執行中的 WorkflowInstance

// Create the main workflow runtime
WorkflowRuntime runtime = new WorkflowRuntime();
// Create a workflow instance
WorkflowInstance workflowInstance = runtime.CreateWorkflow(typeof(Workflow1));
// Obtain a reference to the instance's parent runtime
WorkflowRuntime runtime2 = workflowInstance.WorkflowRuntime;
' Create the main workflow runtime
Dim runtime As New WorkflowRuntime()
' Create a workflow instance
Dim workflowInstance As WorkflowInstance = runtime.CreateWorkflow(GetType(Workflow1))
' Obtain a reference to the instance's parent runtime
Dim runtime2 As WorkflowRuntime = workflowInstance.WorkflowRuntime

適用於