Bagikan melalui


MessagePropertyFilter.UseDeadLetterQueue Properti

Definisi

Mendapatkan atau menetapkan nilai yang menunjukkan apakah akan mengambil UseDeadLetterQueue informasi properti saat menerima atau mengintip pesan.

public:
 property bool UseDeadLetterQueue { bool get(); void set(bool value); };
[System.Messaging.MessagingDescription("MsgUseDeadLetterQueue")]
public bool UseDeadLetterQueue { get; set; }
[<System.Messaging.MessagingDescription("MsgUseDeadLetterQueue")>]
member this.UseDeadLetterQueue : bool with get, set
Public Property UseDeadLetterQueue As Boolean

Nilai Properti

true untuk menerima UseDeadLetterQueue informasi; jika tidak, false. Default adalah true.

Atribut

Contoh

Contoh kode berikut menunjukkan penggunaan UseDeadLetterQueue properti .

// Set the queue's MessageReadPropertyFilter property 
// to enable the message's UseDeadLetterQueue property.
queue->MessageReadPropertyFilter->
    UseDeadLetterQueue = true;

// Peek at the message. Time out after ten seconds 
// in case the message was not delivered.
orderMessage = queue->Peek(TimeSpan::FromSeconds(10.0));

// Display the value of the message's 
// UseDeadLetterQueue property.
Console::WriteLine("Message.UseDeadLetterQueue: {0}", 
    orderMessage->UseDeadLetterQueue);
// Set the queue's MessageReadPropertyFilter property to enable the
// message's UseDeadLetterQueue property.
queue.MessageReadPropertyFilter.UseDeadLetterQueue = true;

// Peek at the message. Time out after ten seconds in case the message
// was not delivered.
orderMessage = queue.Peek(TimeSpan.FromSeconds(10.0));

// Display the value of the message's UseDeadLetterQueue property.
Console.WriteLine("Message.UseDeadLetterQueue: {0}",
    orderMessage.UseDeadLetterQueue);

Keterangan

Properti UseDeadLetterQueue kelas Message menentukan apakah salinan pesan yang tidak dapat dikirim harus dikirim ke antrean surat mati.

Berlaku untuk

Lihat juga