MessagePropertyFilter.Id Proprietà

Definizione

Ottiene o imposta un valore che indica se recuperare le informazioni della proprietà Id quando si riceve o si visualizza un messaggio.

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

Valore della proprietà

true per ricevere le informazioni di Id; false in caso contrario. Il valore predefinito è true.

Attributi

Esempio

Nell'esempio di codice seguente viene illustrato l'uso Id della proprietà.

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

Commenti

La Id proprietà della Message classe indica l'identificatore univoco generato dall'accodamento messaggi del messaggio. Questo identificatore viene generato quando viene inviato il messaggio.

Si applica a

Vedi anche