MessagePropertyFilter.Label Свойство

Определение

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

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

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

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

Атрибуты

Примеры

В следующем примере кода демонстрируется использование 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);
// 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);

Комментарии

Свойство LabelMessage класса задает метку сообщения.

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

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