MessagePropertyFilter.HashAlgorithm Свойство

Определение

Получает или задает значение, указывающее, следует ли извлекать сведения свойства HashAlgorithm при получении или считывании сообщения.

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

Значение свойства

Значение true означает получение сведений HashAlgorithm, в противном случае — значение false. Значение по умолчанию — false.

Атрибуты

Примеры

В следующем примере кода демонстрируется использование 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);
// 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);

Комментарии

Свойство HashAlgorithmMessage класса идентифицирует алгоритм хэширования Message Queuing, который используется при проверке подлинности сообщений. Алгоритм хэширования также используется при создании цифровой подписи для сообщения.

Применяется к

См. также раздел