WorkflowQueuingService.DeleteWorkflowQueue(IComparable) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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