MessagePropertyFilter.SentTime Eigenschap

Definitie

Hiermee wordt een waarde opgehaald of ingesteld die aangeeft of eigenschapsgegevens moeten worden opgehaald SentTime bij het ontvangen of bekijken van een bericht.

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

Waarde van eigenschap

trueom informatie te ontvangenSentTime; anders. false De standaardwaarde is false.

Kenmerken

Voorbeelden

In het volgende codevoorbeeld ziet u hoe de SentTime eigenschap wordt gebruikt.

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

Opmerkingen

De SentTime eigenschap van de Message klasse geeft de datum en tijd aan waarop het bericht is verzonden door bronwachtrijbeheer.

Van toepassing op

Zie ook