MessagePropertyFilter.MessageType Właściwość

Definicja

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

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

Wartość właściwości

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

Atrybuty

Przykłady

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

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

Uwagi

Właściwość MessageTypeMessage klasy identyfikuje typ komunikatu. Wiadomość może być normalnym komunikatem, komunikatem z potwierdzeniem pozytywnym lub negatywnym albo komunikatem raportu.

Dotyczy

Zobacz też