MessagePropertyFilter.Id プロパティ
定義
重要
一部の情報は、リリース前に大きく変更される可能性があるプレリリースされた製品に関するものです。 Microsoft は、ここに記載されている情報について、明示または黙示を問わず、一切保証しません。
メッセージの受信時またはピーク時にプロパティ情報 Id 取得するかどうかを示す値を取得または設定します。
public:
property bool Id { bool get(); void set(bool value); };
[System.Messaging.MessagingDescription("MsgId")]
public bool Id { get; set; }
[<System.Messaging.MessagingDescription("MsgId")>]
member this.Id : bool with get, set
Public Property Id As Boolean
プロパティ値
true
Id情報を受信する場合は。それ以外の場合はfalse。 既定値は、true です。
- 属性
例
次のコード例では、 Id プロパティの使用方法を示します。
// Set the queue's MessageReadPropertyFilter property
// to enable the message's Id property.
queue->MessageReadPropertyFilter->Id = 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 Id property.
Console::WriteLine("Message.Id: {0}", orderMessage->Id);
// Set the queue's MessageReadPropertyFilter property to enable the
// message's Id property.
queue.MessageReadPropertyFilter.Id = 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 Id property.
Console.WriteLine("Message.Id: {0}",
orderMessage.Id);
注釈
Message クラスの Id プロパティは、メッセージ キューによって生成されたメッセージの一意識別子を示します。 この識別子は、メッセージが送信されるときに生成されます。