MessagePropertyFilter.IsLastInTransaction Właściwość

Definicja

Pobiera lub ustawia wartość wskazującą, czy pobierać IsLastInTransaction informacje o właściwości podczas odbierania lub przeglądania komunikatu.

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

Wartość właściwości

true w celu otrzymywania IsLastInTransaction informacji; falsew przeciwnym razie . Wartość domyślna to false.

Atrybuty

Przykłady

W poniższym przykładzie kodu pokazano użycie IsLastInTransaction właściwości .

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

Uwagi

Właściwość IsLastInTransactionMessage klasy jest używana przez odbieranie aplikacji w celu sprawdzenia, czy komunikat jest ostatnim komunikatem wysyłanym z jednej transakcji do jednej kolejki.

Dotyczy

Zobacz też