Udostępnij przez


MessagePropertyFilter.Label Właściwość

Definicja

Pobiera lub ustawia wartość wskazującą, czy pobierać Label informacje o właściwości podczas odbierania lub przeglądania komunikatu.

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

Wartość właściwości

true w celu otrzymywania Label informacji; falsew przeciwnym razie . Wartość domyślna to true.

Atrybuty

Przykłady

W poniższym przykładzie kodu pokazano użycie Label właściwości .

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

Uwagi

Właściwość LabelMessage klasy określa etykietę komunikatu.

Dotyczy

Zobacz też