MessagePropertyFilter.Id-Eigenschaft
Ruft einen Wert ab, der angibt, ob beim Einsehen oder beim Empfang einer Meldung die Message.Id-Eigenschaft abgerufen wird, oder legt diesen fest.
Namespace: System.Messaging
Assembly: System.Messaging (in system.messaging.dll)
'Declaration
Public Property Id As Boolean
'Usage
Dim instance As MessagePropertyFilter
Dim value As Boolean
value = instance.Id
instance.Id = value
public bool Id { get; set; }
public:
property bool Id {
bool get ();
void set (bool value);
}
/** @property */
public boolean get_Id ()
/** @property */
public void set_Id (boolean value)
public function get Id () : boolean
public function set Id (value : boolean)
true, wenn Informationen über die Message.Id abgerufen werden, andernfalls false. Der Standardwert ist true.
Die Id-Eigenschaft der Message-Klasse enthält die von Message Queuing generierte eindeutige ID der Meldung. Diese ID wird beim Absenden der Meldung erzeugt.
Im folgenden Codebeispiel wird die Verwendung der Id-Eigenschaft veranschaulicht.
// 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);
// Set the queue's MessageReadPropertyFilter property to enable the
// message's Id property.
queue.get_MessageReadPropertyFilter().set_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}",
System.Convert.ToString(orderMessage.get_Id()));
- Volle Vertrauenswürdigkeit für den unmittelbaren Aufrufer. Dieser Member kann von nur teilweise vertrauenswürdigem Code nicht verwendet werden. Weitere Informationen finden Sie unter .
Windows 98, Windows 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile für Pocket PC, Windows Mobile für Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
.NET Framework unterstützt nicht alle Versionen sämtlicher Plattformen. Eine Liste der unterstützten Versionen finden Sie unter Systemanforderungen.
Unterstützt in: 2.0, 1.1, 1.0
Unterstützt in: 2.0
MessagePropertyFilter-Klasse
MessagePropertyFilter-Member
System.Messaging-Namespace
Message.Id-Eigenschaft
MessageQueue