語言

TimerEventSubscriptionCollection.Add(TimerEventSubscription) 方法

定義

會把 a TimerEventSubscription 加入計時器佇列。

public:
 void Add(System::Workflow::Runtime::TimerEventSubscription ^ item);
public void Add(System.Workflow.Runtime.TimerEventSubscription item);
member this.Add : System.Workflow.Runtime.TimerEventSubscription -> unit
Public Sub Add (item As TimerEventSubscription)

參數

item
TimerEventSubscription

TimerEventSubscription要加入計時器佇列。

例外狀況

是一個空參考()。

備註

會把 加入 TimerEventSubscription 計時器佇列。 排隊中的訂閱會根據其 TimerEventSubscription.ExpiresAt 數值來定位;價值較小的則排在較大的訂閱前方。 如果新訂閱在佇列 WorkflowSchedulerService.Cancel 開始時加入,會被呼叫來取消原本在佇列開始時的計時器事件,並 WorkflowSchedulerService.Schedule(WaitCallback, Guid, DateTime, Guid) 被呼叫來排程新的計時器事件。 Add 在新增訂閱前鎖定 , TimerEventSubscriptionCollection 因此是安全的。

適用於