MessagePropertyFilter.TimeToReachQueue Eigenschaft

Definition

Ruft einen Wert ab, der angibt, ob beim Einsehen oder beim Empfang einer Meldung die TimeToReachQueue-Eigenschaft abgerufen wird, oder legt diesen fest.

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

Eigenschaftswert

true, wenn Informationen über den TimeToReachQueue abgerufen werden, andernfalls false. Der Standardwert ist false.

Attribute

Beispiele

Im folgenden Codebeispiel wird die Verwendung des TimeToReachQueue-Attributs veranschaulicht.

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

Hinweise

Die TimeToReachQueue -Eigenschaft der Message -Klasse gibt ein Zeitlimit in Sekunden ab dem Zeitpunkt an, zu dem die Nachricht gesendet wird, um die Zielwarteschlange zu erreichen.

Gilt für:

Weitere Informationen