Redigera

Dela via


WorkflowQueuingService.DeleteWorkflowQueue(IComparable) Method

Definition

Deletes the specified WorkflowQueue.

public:
 void DeleteWorkflowQueue(IComparable ^ queueName);
public void DeleteWorkflowQueue (IComparable queueName);
member this.DeleteWorkflowQueue : IComparable -> unit
Public Sub DeleteWorkflowQueue (queueName As IComparable)

Parameters

queueName
IComparable

The name of the WorkflowQueue to delete.

Exceptions

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

Examples

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);
}
Private Sub DeleteQueue(ByVal context As ActivityExecutionContext)
    Console.WriteLine("DeleteQueue")
    Dim qService As WorkflowQueuingService = context.GetService(Of WorkflowQueuingService)()
    qService.DeleteWorkflowQueue(Me.QueueName)
End Sub

Applies to

See also