Språk

MessagePropertyFilter.IsLastInTransaction Egenskap

Definition

Hämtar eller anger ett värde som anger om du vill hämta IsLastInTransaction egenskapsinformation när du tar emot eller granskar ett meddelande.

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

Egenskapsvärde

true för att ta emot IsLastInTransaction information, falseannars . Standardvärdet är false.

Attribut

Exempel

Följande kodexempel visar hur egenskapen används 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);
// 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);

Kommentarer

Egenskapen IsLastInTransaction för Message klassen används genom att ta emot program för att kontrollera om ett meddelande är det sista meddelandet som skickas från en enda transaktion till en enda kö.

Gäller för

Se även