MessagePropertyFilter.ResponseQueue-Eigenschaft
Ruft einen Wert ab, der angibt, ob beim Einsehen oder beim Empfang einer Meldung die Message.ResponseQueue-Eigenschaft abgerufen wird, oder legt diesen fest.
Namespace: System.Messaging
Assembly: System.Messaging (in system.messaging.dll)
Syntax
'Declaration
Public Property ResponseQueue As Boolean
'Usage
Dim instance As MessagePropertyFilter
Dim value As Boolean
value = instance.ResponseQueue
instance.ResponseQueue = value
public bool ResponseQueue { get; set; }
public:
property bool ResponseQueue {
bool get ();
void set (bool value);
}
/** @property */
public boolean get_ResponseQueue ()
/** @property */
public void set_ResponseQueue (boolean value)
public function get ResponseQueue () : boolean
public function set ResponseQueue (value : boolean)
Eigenschaftenwert
true, wenn Informationen über die Message.ResponseQueue abgerufen werden, andernfalls false. Der Standardwert ist true.
Hinweise
Die ResponseQueue-Eigenschaft der Message-Klasse bezeichnet die Warteschlange, die die von einer empfangenden Anwendung an eine sendende Anwendung zurückgegebenen Antwortmeldungen empfängt. Antwortwarteschlangen werden durch die sendende Anwendung beim Senden von Meldungen festgelegt. Jede verfügbare Warteschlange kann als Antwortwarteschlange ausgewählt werden.
An die Antwortwarteschlange zurückgesendete Meldungen sind anwendungsspezifisch. Der Inhalt der Meldungen sowie die Art der Verarbeitung empfangener Meldungen muss in der Anwendung definiert werden.
Beispiel
Im folgenden Codebeispiel wird die Verwendung der ResponseQueue-Eigenschaft veranschaulicht.
// Set the queue's MessageReadPropertyFilter property to enable the
// message's ResponseQueue property.
queue.MessageReadPropertyFilter.ResponseQueue = 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 ResponseQueue.QueueName property.
if(orderMessage.ResponseQueue != null)
{
Console.WriteLine("Message.ResponseQueue.QueueName: {0}",
orderMessage.ResponseQueue.QueueName);
}
// Set the queue's MessageReadPropertyFilter property
// to enable the message's ResponseQueue property.
queue->MessageReadPropertyFilter->ResponseQueue = 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
// Responsequeue->QueueName property.
if (orderMessage->ResponseQueue != nullptr)
{
Console::WriteLine(
"Message.Responsequeue->QueueName: {0}",
orderMessage->ResponseQueue->QueueName);
}
// Set the queue's MessageReadPropertyFilter property to enable the
// message's ResponseQueue property.
queue.get_MessageReadPropertyFilter().set_ResponseQueue(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 ResponseQueue.QueueName property.
if (orderMessage.get_ResponseQueue() != null) {
Console.WriteLine("Message.ResponseQueue.QueueName: {0}",
orderMessage.get_ResponseQueue().get_QueueName());
}
.NET Framework-Sicherheit
- 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 .
Plattformen
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.
Versionsinformationen
.NET Framework
Unterstützt in: 2.0, 1.1, 1.0
.NET Compact Framework
Unterstützt in: 2.0
Siehe auch
Referenz
MessagePropertyFilter-Klasse
MessagePropertyFilter-Member
System.Messaging-Namespace
Message.ResponseQueue-Eigenschaft
MessageQueue