Message.IsLastInTransaction プロパティとは何? わかりやすく解説 Weblio辞書 (original) (raw)

メッセージトランザクション送信され最後のメッセージかどうかを示す値を取得します

名前空間: System.Messaging
アセンブリ: System.Messaging (system.messaging.dll 内)
構文構文

Visual Basic (宣言)

Public ReadOnly Property IsLastInTransaction As Boolean

Visual Basic (使用法)

Dim instance As Message Dim value As Boolean

value = instance.IsLastInTransaction

C#

public bool IsLastInTransaction { get; }

C++

public: property bool IsLastInTransaction { bool get (); }

J#

/** @property */ public boolean get_IsLastInTransaction ()

JScript

public function get IsLastInTransaction () : boolean

プロパティ
そのメッセージトランザクション送信され最後のメッセージである場合は **true**。それ以外場合は **false**。

例外例外

例外種類 条件
InvalidOperationException メッセージ送信されていません。このプロパティは、キューから取得したメッセージでだけ読み込むことができます。 または フィルタ処理されたメッセージ キューが、IsLastInTransaction プロパティ無視します。

解説解説

受信側アプリケーションは、そのメッセージ1 つトランザクション1 つキュー送信され最後のメッセージかどうかIsLastInTransaction プロパティ使って確認します

このプロパティは、メッセージ キュー Version 2.0 以降でだけ使用できます

トランザクション境界確認するために IsLastInTransaction プロパティと共に使用できるプロパティは、IsFirstInTransaction と TransactionId です。前者メッセージトランザクション送信され最初メッセージかどうか確認するために使用し後者トランザクションID取得するために使用します

トランザクション内で送信されメッセージ1 つだけであるときは、IsFirstInTransaction プロパティIsLastInTransaction プロパティは、どちらも true設定されます。

使用例使用例

メッセージIsLastInTransaction プロパティの値を表示するコード例次に示します

C#

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

C++

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

J#

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

.NET Framework のセキュリティ.NET Frameworkセキュリティ

プラットフォームプラットフォーム

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.01.11.0
.NET Compact Framework
サポート対象 : 2.0

参照参照

関連項目
Message クラス
Message メンバ
System.Messaging 名前空間
Message.IsFirstInTransaction プロパティ
TransactionId
Transactional