Bagikan melalui


MessagePropertyFilter.UseAuthentication Properti

Definisi

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

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

Nilai Properti

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

Atribut

Contoh

Contoh kode berikut menunjukkan penggunaan UseAuthentication properti .

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

Keterangan

Properti UseAuthentication kelas Message menentukan apakah pesan perlu diautentikasi.

Tidak dimungkinkan untuk melihat properti pesan dan menentukan apakah autentikasi pesan gagal. Pesan yang gagal autentikasi dibuang dan tidak dikirim ke antrean.

Berlaku untuk

Lihat juga