Bagikan melalui


MessagePropertyFilter.TimeToBeReceived Properti

Definisi

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

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

Nilai Properti

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

Atribut

Contoh

Contoh kode berikut menunjukkan penggunaan TimeToBeReceived properti .

// Set the queue's MessageReadPropertyFilter property 
// to enable the message's TimeToBeReceived property.
queue->MessageReadPropertyFilter->
    TimeToBeReceived = 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 
// TimeToBeReceived property.
Console::WriteLine("Message.TimeToBeReceived: {0}", 
    orderMessage->TimeToBeReceived);
// Set the queue's MessageReadPropertyFilter property to enable the
// message's TimeToBeReceived property.
queue.MessageReadPropertyFilter.TimeToBeReceived = 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 TimeToBeReceived property.
Console.WriteLine("Message.TimeToBeReceived: {0}",
    orderMessage.TimeToBeReceived);

Keterangan

Properti TimeToBeReceivedMessage kelas menentukan total waktu dalam detik agar pesan terkirim diterima dari antrean tujuan. Batas waktu untuk pesan yang akan diambil dari antrean target mencakup waktu yang dihabiskan untuk sampai ke antrean tujuan, ditambah waktu yang dihabiskan untuk menunggu dalam antrean sebelum pesan diambil oleh aplikasi.

Berlaku untuk

Lihat juga