MessagePropertyFilter.SentTime Свойство

Определение

Получает или задает значение, указывающее, следует ли извлекать сведения свойства SentTime при получении или считывании сообщения.

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

Значение свойства

Значение true означает получение сведений SentTime, в противном случае — значение false. Значение по умолчанию — false.

Атрибуты

Примеры

В следующем примере кода демонстрируется использование 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);
// 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);

Комментарии

Свойство SentTimeMessage класса указывает дату и время отправляющего компьютера, когда сообщение было отправлено исходным диспетчером очередей.

Применяется к

См. также раздел