Share via


WorkflowQueuingService.DeleteWorkflowQueue(IComparable) 方法

定義

刪除指定的 WorkflowQueue

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

參數

queueName
IComparable

要刪除之 WorkflowQueue 的名稱。

例外狀況

queueName 為 null 參考 (在 Visual Basic 中為 Nothing)。

範例

下列程式碼範例將示範將字串寫入主控台的方法,透過呼叫 WorkflowQueuingService 方法建立 ActivityExecutionContext.GetService 的執行個體。 最後,程式碼會呼叫 DeleteWorkflowQueue 方法,以刪除目前工作流程上與 QueueName 屬性關聯的佇列。

這個程式碼範例是 FileSystemEvent.cs 檔案中<檔案監看員活動 SDK>範例的一部分。 如需詳細資訊,請參閱 檔案系統監看員活動

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

適用於

另請參閱