MessagePropertyFilter.UseAuthentication Właściwość

Definicja

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

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

Wartość właściwości

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

Atrybuty

Przykłady

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

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

Uwagi

Właściwość UseAuthenticationMessage klasy określa, czy komunikat musi zostać uwierzytelniony.

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ż