MessagePropertyFilter.SentTime Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets or sets a value that indicates whether to retrieve SentTime property information when receiving or peeking a message.
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
Property Value
true
to receive SentTime information; otherwise, false
. The default is false
.
- Attributes
Examples
The following code example demonstrates the use of the SentTime property.
// 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);
Remarks
The SentTime property of the Message class indicates the sending machine's date and time when the message was sent by the source Queue Manager.