MessagePropertyFilter.IsFirstInTransaction Proprietà

Definizione

Ottiene o imposta un valore che indica se recuperare le informazioni della proprietà IsFirstInTransaction quando si riceve o si visualizza un messaggio.

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

Valore della proprietà

true per ricevere le informazioni di IsFirstInTransaction; false in caso contrario. Il valore predefinito è false.

Attributi

Esempio

Nell'esempio di codice seguente viene illustrato l'uso IsFirstInTransaction della proprietà.

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

Commenti

La IsFirstInTransaction proprietà della classe viene usata dalla ricezione delle Message applicazioni per verificare se un messaggio è il primo messaggio inviato in una singola transazione a una singola coda.

Si applica a

Vedi anche