ערוך

שתף באמצעות


MessagePropertyFilter.UseEncryption Property

Definition

Gets or sets a value that indicates whether to retrieve UseEncryption property information when receiving or peeking a message.

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

Property Value

true to receive UseEncryption information; otherwise, false. The default is false.

Attributes

Examples

The following code example demonstrates the use of the UseEncryption property.

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

Remarks

The UseEncryption property of the Message class specifies whether to encrypt a message.

Applies to

See also