Udostępnij przez


MessagePropertyFilter.Id Właściwość

Definicja

Pobiera lub ustawia wartość wskazującą, czy pobierać Id informacje o właściwości podczas odbierania lub podglądu komunikatu.

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

Wartość właściwości

true aby otrzymywać Id informacje; w przeciwnym razie false. Wartość domyślna to true.

Atrybuty

Przykłady

Poniższy przykład kodu przedstawia użycie Id właściwości.

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

Uwagi

Właściwość IdMessage klasy wskazuje unikatowy identyfikator komunikatu wygenerowany przez kolejkowanie komunikatów. Ten identyfikator jest generowany podczas wysyłania komunikatu.

Dotyczy

Zobacz też