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

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

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

Visual Basic (宣言)

Public ReadOnly Property IsFirstInTransaction As Boolean

Visual Basic (使用法)

Dim instance As Message Dim value As Boolean

value = instance.IsFirstInTransaction

C#

public bool IsFirstInTransaction { get; }

C++

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

J#

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

JScript

public function get IsFirstInTransaction () : boolean

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

例外例外

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

解説解説

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

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

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

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

使用例使用例

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

C#

// Display the value of the message's IsFirstInTransaction property. // To view this property value, the queue's // MessageReadPropertyFilter.IsFirstInTransaction property must be set // to true before the message is received. Console.WriteLine("Message.IsFirstInTransaction: {0}", orderMessage.IsFirstInTransaction);

C++

// Display the value of the message's IsFirstInTransaction property. // To view this property value, the queue's // MessageReadPropertyFilter.IsFirstInTransaction property must be set // to true before the message is received. Console::WriteLine("Message.IsFirstInTransaction: {0}", orderMessage->IsFirstInTransaction);

J#

// Display the value of the message's IsFirstInTransaction property. // To view this property value, the queue's // MessageReadPropertyFilter.IsFirstInTransaction property must be set // to true before the message is received. Console.WriteLine("Message.IsFirstInTransaction: {0}", System.Convert.ToString(orderMessage.get_IsFirstInTransaction()));

.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 名前空間
IsLastInTransaction
TransactionId
Transactional