MessagePropertyFilter.Authenticated Proprietà

Definizione

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

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

Valore della proprietà

Boolean

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

Attributi

Esempio

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

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

Commenti

La Authenticated proprietà della Message classe viene utilizzata dall'applicazione ricevente per determinare se è stata richiesta l'autenticazione. Se è stata richiesta l'autenticazione e il messaggio si trova nella coda, il messaggio viene autenticato.

Non è possibile esaminare le proprietà di un messaggio e determinare se un messaggio non è riuscito ad eseguire l'autenticazione. I messaggi che non soddisfano l'autenticazione vengono eliminati e non vengono recapitati alla coda.

Si applica a

Vedi anche