MessagePropertyFilter.UseAuthentication Eigenschap

Definitie

Hiermee wordt een waarde opgehaald of ingesteld die aangeeft of eigenschapsgegevens moeten worden opgehaald UseAuthentication bij het ontvangen of bekijken van een bericht.

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

Waarde van eigenschap

trueom informatie te ontvangenUseAuthentication; anders. false De standaardwaarde is false.

Kenmerken

Voorbeelden

In het volgende codevoorbeeld ziet u hoe de UseAuthentication eigenschap wordt gebruikt.

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

Opmerkingen

De UseAuthentication eigenschap van de Message klasse geeft aan of het bericht moet worden geverifieerd.

Het is niet mogelijk om de eigenschappen van een bericht te bekijken en te bepalen of een bericht is mislukt. Berichten die niet worden geverifieerd, worden verwijderd en worden niet bezorgd in de wachtrij.

Van toepassing op

Zie ook