MessagePropertyFilter.DestinationQueue Egenskap

Definition

Hämtar eller anger ett värde som anger om du vill hämta DestinationQueue egenskapsinformation när du tar emot eller granskar ett meddelande.

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

Egenskapsvärde

true för att ta emot DestinationQueue information, falseannars . Standardvärdet är false.

Attribut

Exempel

Följande kodexempel visar hur egenskapen används 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);

Kommentarer

Egenskapen DestinationQueue för Message klassen identifierar meddelandets ursprungliga målkö. Det används vanligtvis för att fastställa det ursprungliga målet för ett meddelande som finns i en journal eller en kö med obeställbara meddelanden. Det kan också användas när du skickar ett svarsmeddelande tillbaka till en svarskö.

Gäller för

Se även