MessagePropertyFilter.SentTime Właściwość

Definicja

Pobiera lub ustawia wartość wskazującą, czy pobierać SentTime informacje o właściwości podczas odbierania lub przeglądania komunikatu.

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

Wartość właściwości

true w celu otrzymywania SentTime informacji; falsew przeciwnym razie . Wartość domyślna to false.

Atrybuty

Przykłady

W poniższym przykładzie kodu pokazano użycie SentTime właściwości .

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

Uwagi

Właściwość SentTimeMessage klasy wskazuje datę i godzinę wysyłania komunikatu przez źródłową usługę Queue Manager.

Dotyczy

Zobacz też