MessagePropertyFilter.TimeToBeReceived Właściwość

Definicja

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

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

Wartość właściwości

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

Atrybuty

Przykłady

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

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

Uwagi

Właściwość TimeToBeReceivedMessage klasy określa całkowity czas w sekundach odebrania wysłanego komunikatu z kolejki docelowej. Limit czasu pobierania komunikatu z kolejki docelowej obejmuje czas spędzony na dotarciu do kolejki docelowej oraz czas spędzony na oczekiwaniu w kolejce przed pobraniem komunikatu przez aplikację.

Dotyczy

Zobacz też