MessagePropertyFilter.Label Propiedad

Definición

Obtiene o establece un valor que indica si se debe recuperar información de la propiedad Label al recibir un mensaje o leerlo.

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

Valor de propiedad

Boolean

true para recibir información de Label; en cualquier otro caso, false. De manera predeterminada, es true.

Atributos

Ejemplos

En el ejemplo de código siguiente se muestra el uso de la Label propiedad .

// 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);

Comentarios

La Label propiedad de la Message clase especifica la etiqueta del mensaje.

Se aplica a

Consulte también