MessagePropertyFilter.UseEncryption Egenskap

Definition

Hämtar eller anger ett värde som anger om du vill hämta UseEncryption egenskapsinformation när du tar emot eller granskar ett meddelande.

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

Egenskapsvärde

true för att ta emot UseEncryption information, falseannars . Standardvärdet är false.

Attribut

Exempel

Följande kodexempel visar hur egenskapen används UseEncryption .

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

Kommentarer

Egenskapen UseEncryption för Message klassen anger om ett meddelande ska krypteras.

Gäller för

Se även