MessagePropertyFilter.TransactionId プロパティ

定義

メッセージを受信またはピークするときに TransactionId プロパティ情報を取得するかどうかを示す値を取得または設定します。

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

プロパティ値

TransactionId 情報を受信する場合は true。それ以外の場合は false。 既定値は、false です。

属性

次のコード例では、 プロパティの使用方法を TransactionId 示します。

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

注釈

クラスの プロパティは TransactionIdMessage メッセージを送信したトランザクションを識別します。 メッセージが特定のトランザクションの一部として送信されたことを確認するには、受信アプリケーション内でこのプロパティを使用します。

適用対象

こちらもご覧ください