MessagePropertyFilter.IsFirstInTransaction Eigenschap

Definitie

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

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

Waarde van eigenschap

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

Kenmerken

Voorbeelden

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

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

Opmerkingen

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

Van toepassing op

Zie ook