共用方式為


DurableTimerExtension.SetInstance(WorkflowInstanceProxy) 方法

定義

將指定的工作流程執行個體建立為目前的執行個體。

public:
 virtual void SetInstance(System::Activities::Hosting::WorkflowInstanceProxy ^ instance);
public virtual void SetInstance (System.Activities.Hosting.WorkflowInstanceProxy instance);
abstract member SetInstance : System.Activities.Hosting.WorkflowInstanceProxy -> unit
override this.SetInstance : System.Activities.Hosting.WorkflowInstanceProxy -> unit
Public Overridable Sub SetInstance (instance As WorkflowInstanceProxy)

參數

instance
WorkflowInstanceProxy

將工作流程執行個體變更為使用中的工作流程執行個體。

實作

備註

DurableTimerExtension物件只能與單一工作流程實例相關聯。 DurableTimerExtension如果物件與多個工作流程實例搭配使用,InvalidOperationException則會擲回具有下列訊息的 :

This TimerExtension has already been attached to a workflow instance.  

適用於