MessagePropertyFilter.IsLastInTransaction Eigenschap

Definitie

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

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

Waarde van eigenschap

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

Kenmerken

Voorbeelden

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

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

Opmerkingen

De IsLastInTransaction eigenschap van de Message klasse wordt gebruikt door toepassingen te ontvangen om te controleren of een bericht het laatste bericht is dat van één transactie naar één wachtrij wordt verzonden.

Van toepassing op

Zie ook