MessagePropertyFilter.TimeToReachQueue Właściwość

Definicja

Pobiera lub ustawia wartość wskazującą, czy pobierać TimeToReachQueue informacje o właściwości podczas odbierania lub podglądu komunikatu.

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

Wartość właściwości

true aby otrzymywać TimeToReachQueue informacje; w przeciwnym razie false. Wartość domyślna to false.

Atrybuty

Przykłady

Poniższy przykład kodu przedstawia użycie TimeToReachQueue właściwości.

// 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);

Uwagi

Właściwość TimeToReachQueueMessage klasy określa limit czasu w sekundach od momentu wysłania komunikatu w celu osiągnięcia kolejki docelowej.

Dotyczy

Zobacz też