Compartir por


MessagePropertyFilter.HashAlgorithm Propiedad

Definición

Obtiene o establece un valor que indica si se va a recuperar HashAlgorithm información de propiedad al recibir o ver un mensaje.

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 propiedad

true para recibir HashAlgorithm información; de lo contrario, falsees . El valor predeterminado es false.

Atributos

Ejemplos

En el ejemplo de código siguiente se muestra el uso de la HashAlgorithm propiedad .

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

Comentarios

La HashAlgorithm propiedad de la Message clase identifica el algoritmo hash Queuing utiliza al autenticar mensajes. El algoritmo hash también se usa al crear una firma digital para un mensaje.

Se aplica a

Consulte también