WorkflowQueue.UnregisterForQueueItemAvailable Method
.NET Framework 3.0
Unregisters a subscriber to the QueueItemAvailable event.
Namespace: System.Workflow.Runtime
Assembly: System.Workflow.Runtime (in system.workflow.runtime.dll)
Assembly: System.Workflow.Runtime (in system.workflow.runtime.dll)
public void UnregisterForQueueItemAvailable ( IActivityEventListener<QueueEventArgs> eventListener )
public void UnregisterForQueueItemAvailable ( IActivityEventListener<QueueEventArgs> eventListener )
public function UnregisterForQueueItemAvailable ( eventListener : IActivityEventListener<QueueEventArgs> )
Not applicable.
Parameters
- eventListener
A subscriber for QueueEventArgs that implements the IActivityEventListener interface.
The following code example demonstrates how you can create a WorkflowQueue by calling the WorkflowQueuingService.GetWorkflowQueue method. It also uses the UnregisterForQueueItemAvailable to unregister the specified listener.
This code example is part of the File Watcher Activity SDK Sample from the FileSystemEvent.cs file. For more information, see File System Watcher Activity.
private void DoUnsubscribe(ActivityExecutionContext context, IActivityEventListener<QueueEventArgs> listener) { if (!this.subscriptionId.Equals(Guid.Empty)) { FileWatcherService fileService = context.GetService<FileWatcherService>(); fileService.UnregisterListener(this.subscriptionId); this.subscriptionId = Guid.Empty; } WorkflowQueuingService qService = context.GetService<WorkflowQueuingService>(); WorkflowQueue queue = qService.GetWorkflowQueue(this.QueueName); queue.UnregisterForQueueItemAvailable(listener); }
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.