MessagePropertyFilter.UseEncryption Właściwość

Definicja

Pobiera lub ustawia wartość wskazującą, czy pobierać UseEncryption informacje o właściwości podczas odbierania lub podglądu komunikatu.

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

Wartość właściwości

true aby otrzymywać UseEncryption informacje; w przeciwnym razie false. Wartość domyślna to false.

Atrybuty

Przykłady

Poniższy przykład kodu przedstawia użycie UseEncryption właściwości.

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

Uwagi

Właściwość UseEncryptionMessage klasy określa, czy chcesz zaszyfrować komunikat.

Dotyczy

Zobacz też