MessagePropertyFilter.Authenticated Właściwość

Definicja

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

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

Wartość właściwości

Boolean

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

Atrybuty

Przykłady

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

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

Uwagi

Właściwość Authenticated Message klasy jest używana przez odbieraną aplikację do określenia, czy zażądano uwierzytelnienia. Jeśli zażądano uwierzytelniania, a komunikat znajduje się w kolejce, komunikat jest uwierzytelniany.

Nie można przyjrzeć się właściwościom komunikatu i określić, czy uwierzytelnianie komunikatu nie powiodło się. Komunikaty, które nie powiodły się uwierzytelnianie, są odrzucane i nie są dostarczane do kolejki.

Dotyczy

Zobacz też