Bagikan melalui


WorkflowQueuingService.DeleteWorkflowQueue(IComparable) Metode

Definisi

Menghapus yang ditentukan WorkflowQueue.

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

Parameter

queueName
IComparable

Nama yang akan WorkflowQueue dihapus.

Pengecualian

queueName adalah referensi null (Nothing di Visual Basic).

Contoh

Contoh kode berikut menunjukkan metode yang menulis string ke konsol, membuat instans WorkflowQueuingService dengan memanggil ActivityExecutionContext.GetService metode . Terakhir, kode memanggil DeleteWorkflowQueue metode untuk menghapus antrean yang QueueName terkait dengan properti pada alur kerja saat ini.

Contoh kode ini adalah bagian dari Sampel SDK Aktivitas Pengamat File dari file FileSystemEvent.cs. Untuk informasi selengkapnya, lihat Aktivitas Pengamat Sistem File.

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

Berlaku untuk

Lihat juga