Share via


MessagePropertyFilter.UseAuthentication Özellik

Tanım

İletiyi alırken veya göz atırken özellik bilgilerinin alınıp alınmayacağını UseAuthentication belirten bir değer alır veya ayarlar.

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

Özellik Değeri

true bilgi almak UseAuthentication için; aksi takdirde , false. Varsayılan değer: false.

Öznitelikler

Örnekler

Aşağıdaki kod örneği özelliğinin UseAuthentication kullanımını gösterir.

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

Açıklamalar

UseAuthentication sınıfının özelliğiMessage, iletinin kimliğinin doğrulanması gerekip gerekmediğini belirtir.

bir iletinin özelliklerine bakmak ve bir iletinin kimlik doğrulamasının başarısız olup olmadığını belirlemek mümkün değildir. Kimlik doğrulaması başarısız olan iletiler atılır ve kuyruğa teslim edilmez.

Şunlara uygulanır

Ayrıca bkz.