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.  

适用于