Bagikan melalui


MessagePropertyFilter.EncryptionAlgorithm Properti

Definisi

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

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

Nilai Properti

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

Atribut

Contoh

Contoh kode berikut menunjukkan penggunaan EncryptionAlgorithm properti .

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

Keterangan

Jika pesan bersifat privat, pesan dienkripsi sebelum dikirim dan didekripsi saat diterima. Properti EncryptionAlgorithmMessage kelas menentukan algoritma yang digunakan untuk mengenkripsi isi pesan pesan dari pesan privat.

Berlaku untuk

Lihat juga