MessagePropertyFilter.TimeToBeReceived プロパティ

定義

メッセージを受信またはピークするときに TimeToBeReceived プロパティ情報を取得するかどうかを示す値を取得または設定します。

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

プロパティ値

TimeToBeReceived 情報を受信する場合は true。それ以外の場合は false。 既定値は、false です。

属性

次のコード例では、 プロパティの使用方法を 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);
// 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);

注釈

クラスの Message プロパティはTimeToBeReceived、送信先キューから送信されたメッセージを受信する合計時間を秒単位で指定します。 ターゲット キューからメッセージを取得するための時間制限には、宛先キューへの取得に費やされた時間と、アプリケーションによってメッセージが取得されるまでのキューでの待機に費やされた時間が含まれます。

適用対象

こちらもご覧ください