MessagePropertyFilter.UseAuthentication Propriedade

Definição

Recebe ou define um valor que indica se deve recuperar UseAuthentication informação de propriedade ao receber ou espreitar uma mensagem.

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

Valor de Propriedade

true para receber UseAuthentication informação; caso contrário, false. A predefinição é false.

Atributos

Exemplos

O seguinte exemplo de código demonstra a utilização da UseAuthentication propriedade.

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

Observações

A UseAuthentication propriedade da Message classe especifica se a mensagem precisa de ser autenticada.

Não é possível analisar as propriedades de uma mensagem e determinar se uma mensagem falhou a autenticação. As mensagens que falham na autenticação são descartadas e não são entregues à fila.

Aplica-se a

Ver também