MessagePropertyFilter.DestinationQueue Свойство

Определение

Получает или задает значение, указывающее, следует ли извлекать сведения свойства DestinationQueue при получении или считывании сообщения.

public:
 property bool DestinationQueue { bool get(); void set(bool value); };
[System.Messaging.MessagingDescription("MsgDestinationQueue")]
public bool DestinationQueue { get; set; }
[<System.Messaging.MessagingDescription("MsgDestinationQueue")>]
member this.DestinationQueue : bool with get, set
Public Property DestinationQueue As Boolean

Значение свойства

Значение true означает получение сведений DestinationQueue, в противном случае — значение false. Значение по умолчанию — false.

Атрибуты

Примеры

В следующем примере кода демонстрируется использование DestinationQueue свойство.

// Set the queue's MessageReadPropertyFilter property 
// to enable the message's DestinationQueue property.
queue->MessageReadPropertyFilter->
    DestinationQueue = 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 
// Destinationqueue->QueueName property.
Console::WriteLine(
    "Message.Destinationqueue->QueueName: {0}", 
    orderMessage->DestinationQueue->QueueName);
// Set the queue's MessageReadPropertyFilter property to enable the
// message's DestinationQueue property.
queue.MessageReadPropertyFilter.DestinationQueue = 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 DestinationQueue.QueueName
// property.
Console.WriteLine("Message.DestinationQueue.QueueName: {0}",
    orderMessage.DestinationQueue.QueueName);

Комментарии

Свойство DestinationQueueMessage класса определяет исходную целевую очередь сообщения. Обычно он используется для определения исходного назначения сообщения, которое находится в журнале или очереди недоставленных сообщений. Его также можно использовать при отправке ответного сообщения обратно в очередь ответов.

Применяется к

См. также раздел