MessagePropertyFilter.IsFirstInTransaction Właściwość

Definicja

Pobiera lub ustawia wartość wskazującą, czy pobierać IsFirstInTransaction informacje o właściwości podczas odbierania lub podglądu komunikatu.

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

Wartość właściwości

true aby otrzymywać IsFirstInTransaction informacje; w przeciwnym razie false. Wartość domyślna to false.

Atrybuty

Przykłady

Poniższy przykład kodu przedstawia użycie IsFirstInTransaction właściwości.

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

Uwagi

Właściwość IsFirstInTransactionMessage klasy jest używana przez odbieranie aplikacji w celu sprawdzenia, czy komunikat jest pierwszym komunikatem wysłanym w jednej transakcji do jednej kolejki.

Dotyczy

Zobacz też