This documentation is archived and is not being maintained.

TimerEventSubscriptionCollection.Add Method

Adds a TimerEventSubscription to the timer queue.

Namespace: System.Workflow.Runtime
Assembly: System.Workflow.Runtime (in system.workflow.runtime.dll)

public void Add (
	TimerEventSubscription item
public void Add (
	TimerEventSubscription item
public function Add (
	item : TimerEventSubscription
Not applicable.



The TimerEventSubscription to add to the timer queue.

Exception typeCondition


item is a null reference (Nothing in Visual Basic).

Adds the TimerEventSubscription to the timer queue. Subscriptions in the queue are positioned based on their TimerEventSubscription.ExpiresAt values; those with smaller values are positioned in front of those with larger values. If the new subscription is added at the beginning of the queue, WorkflowSchedulerService.Cancel is called to cancel the timer event that was previously at the beginning of the queue and WorkflowSchedulerService.Schedule is called to schedule the new timer event. Add locks the TimerEventSubscriptionCollection before adding the new subscription and is, therefore, thread safe.

Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0