MessagePropertyFilter.UseEncryption Eigenschaft

Definition

Ruft einen Wert ab, der angibt, ob beim Einsehen oder beim Empfang einer Meldung die UseEncryption-Eigenschaft abgerufen wird, oder legt diesen fest.

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

Eigenschaftswert

true, wenn Informationen über den UseEncryption abgerufen werden, andernfalls false. Der Standardwert ist false.

Attribute

Beispiele

Im folgenden Codebeispiel wird die Verwendung des UseEncryption-Attributs veranschaulicht.

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

Hinweise

Die UseEncryption -Eigenschaft der Message -Klasse gibt an, ob eine Nachricht verschlüsselt werden soll.

Gilt für:

Weitere Informationen