Bagikan melalui


MessagePropertyFilter.HashAlgorithm Properti

Definisi

Mendapatkan atau menetapkan nilai yang menunjukkan apakah akan mengambil HashAlgorithm informasi properti saat menerima atau mengintip pesan.

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

Nilai Properti

true untuk menerima HashAlgorithm informasi; jika tidak, false. Default adalah false.

Atribut

Contoh

Contoh kode berikut menunjukkan penggunaan HashAlgorithm properti .

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

Keterangan

Properti HashAlgorithm kelas Message mengidentifikasi algoritma hash yang digunakan Antrean Pesan saat mengautentikasi pesan. Algoritma hash juga digunakan saat membuat tanda tangan digital untuk pesan.

Berlaku untuk

Lihat juga