MessagePropertyFilter.DestinationSymmetricKey 屬性

定義

取得或設定值,指出在接收或窺視訊息時是否要擷取 DestinationSymmetricKey 屬性資訊。

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

屬性值

true 表示接收 DestinationSymmetricKey 資訊,否則為 false。 預設為 false

屬性

範例

下列程式碼範例示範 屬性的使用 DestinationSymmetricKey

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

備註

類別 DestinationSymmetricKeyMessage 屬性會指定用來加密訊息的對稱金鑰。 當您傳送應用程式加密的訊息,或將加密的訊息傳送至外部佇列時,則需要它。

外部佇列存在於佇列系統中,而不是Microsoft訊息佇列。 Microsoft訊息佇列會透過連接器應用程式與這類佇列通訊。

適用於

另請參閱