MessagePropertyFilter.HashAlgorithm Egenskap

Definition

Hämtar eller anger ett värde som anger om du vill hämta HashAlgorithm egenskapsinformation när du tar emot eller granskar ett meddelande.

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

Egenskapsvärde

true för att ta emot HashAlgorithm information, falseannars . Standardvärdet är false.

Attribut

Exempel

Följande kodexempel visar hur egenskapen används 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);

Kommentarer

Egenskapen HashAlgorithm för Message klassen identifierar hashalgoritmen Message Queuing använder när meddelanden autentiseras. Hash-algoritmen används också när du skapar en digital signatur för ett meddelande.

Gäller för

Se även