MessagePropertyFilter.HashAlgorithm Propriedade

Definição

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

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

Valor de Propriedade

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

Atributos

Exemplos

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

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

Observações

A HashAlgorithm propriedade da Message classe identifica o algoritmo de hash que a Message Queuing utiliza ao autenticar mensagens. O algoritmo de hashing também é utilizado na criação de uma assinatura digital para uma mensagem.

Aplica-se a

Ver também