Export (0) Print
Expand All

WorkflowQueuingService.DeleteWorkflowQueue Method

Deletes the specified WorkflowQueue.

Namespace:  System.Workflow.Runtime
Assembly:  System.Workflow.Runtime (in System.Workflow.Runtime.dll)

public void DeleteWorkflowQueue(
	IComparable queueName
)

Parameters

queueName
Type: System.IComparable

The name of the WorkflowQueue to delete.

ExceptionCondition
ArgumentNullException

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

The following code example demonstrates a method that writes a string to the console, creates an instance of WorkflowQueuingService by calling the ActivityExecutionContext.GetService method. Finally, the code calls the DeleteWorkflowQueue method to delete the queue associated with a QueueName property on the current workflow.

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 DeleteQueue(ActivityExecutionContext context)
{
    Console.WriteLine("DeleteQueue");
    WorkflowQueuingService qService = context.GetService<WorkflowQueuingService>();
    qService.DeleteWorkflowQueue(this.QueueName);
}

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0
Show:
© 2015 Microsoft