Message.IsLastInTransaction プロパティとは何? わかりやすく解説 Weblio辞書 (original) (raw)
メッセージがトランザクションで送信された最後のメッセージかどうかを示す値を取得します。
名前空間: System.Messaging
アセンブリ: System.Messaging (system.messaging.dll 内)
構文
Public ReadOnly Property IsLastInTransaction As Boolean
Dim instance As Message Dim value As Boolean
value = instance.IsLastInTransaction
public bool IsLastInTransaction { get; }
public: property bool IsLastInTransaction { bool get (); }
/** @property */ public boolean get_IsLastInTransaction ()
public function get IsLastInTransaction () : boolean
プロパティ値
そのメッセージがトランザクションで送信された最後のメッセージである場合は **true**。それ以外の場合は **false**。
| 例外の種類 | 条件 |
|---|---|
| InvalidOperationException | メッセージは送信されていません。このプロパティは、キューから取得したメッセージでだけ読み込むことができます。 または フィルタ処理されたメッセージ キューが、IsLastInTransaction プロパティを無視します。 |
受信側アプリケーションは、そのメッセージが 1 つのトランザクションで 1 つのキューに送信された最後のメッセージかどうかを IsLastInTransaction プロパティを使って確認します。
このプロパティは、メッセージ キュー Version 2.0 以降でだけ使用できます。
トランザクションの境界を確認するために IsLastInTransaction プロパティと共に使用できるプロパティは、IsFirstInTransaction と TransactionId です。前者はメッセージがトランザクションで送信された最初のメッセージかどうかを確認するために使用し、後者はトランザクションの ID を取得するために使用します。
トランザクション内で送信されたメッセージが 1 つだけであるときは、IsFirstInTransaction プロパティと IsLastInTransaction プロパティは、どちらも true に設定されます。
メッセージの IsLastInTransaction プロパティの値を表示するコード例を次に示します。
// Display the value of the message's IsLastInTransaction property. // To view this property value, the queue's // MessageReadPropertyFilter.IsLastInTransaction property must be set // to true before the message is received. Console.WriteLine("Message.IsLastInTransaction: {0}", orderMessage.IsLastInTransaction);
// Display the value of the message's IsLastInTransaction property. // To view this property value, the queue's // MessageReadPropertyFilter.IsLastInTransaction property must be set // to true before the message is received. Console::WriteLine("Message.IsLastInTransaction: {0}", orderMessage->IsLastInTransaction);
// Display the value of the message's IsLastInTransaction property. // To view this property value, the queue's // MessageReadPropertyFilter.IsLastInTransaction property must be set // to true before the message is received. Console.WriteLine("Message.IsLastInTransaction: {0}", System.Convert.ToString(orderMessage.get_IsLastInTransaction()));
Windows 98, Windows 2000 SP4, Windows CE, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。
.NET Framework
サポート対象 : 2.0、1.1、1.0
.NET Compact Framework
サポート対象 : 2.0
関連項目
Message クラス
Message メンバ
System.Messaging 名前空間
Message.IsFirstInTransaction プロパティ
TransactionId
Transactional