MessagePropertyFilter.ConnectorType 屬性
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
取得或設定值,指出在接收或窺視訊息時是否要擷取 ConnectorType 屬性資訊。
public:
property bool ConnectorType { bool get(); void set(bool value); };
[System.Messaging.MessagingDescription("MsgConnectorType")]
public bool ConnectorType { get; set; }
[<System.Messaging.MessagingDescription("MsgConnectorType")>]
member this.ConnectorType : bool with get, set
Public Property ConnectorType As Boolean
屬性值
true
表示接收 ConnectorType 資訊,否則為 false
。 預設為 false
。
- 屬性
範例
下列程式代碼範例示範 屬性的使用 ConnectorType 。
// Set the queue's MessageReadPropertyFilter property
// to enable the message's ConnectorType property.
queue->MessageReadPropertyFilter->ConnectorType = 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
// ConnectorType property.
Console::WriteLine("Message.ConnectorType: {0}",
orderMessage->ConnectorType);
// Set the queue's MessageReadPropertyFilter property to enable the
// message's ConnectorType property.
queue.MessageReadPropertyFilter.ConnectorType = 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 ConnectorType property.
Console.WriteLine("Message.ConnectorType: {0}",
orderMessage.ConnectorType);
備註
ConnectorType當應用程式設定通常由消息佇列所設定的訊息屬性時,需要 類別的 Message 屬性。 它用於下列兩個實例:
當連接器應用程式傳遞訊息時,傳送和接收應用程式需要 , Message.ConnectorType 才能解譯訊息的安全性和通知屬性。
傳送應用程式加密的訊息時, Message.ConnectorType 屬性會通知消息佇列使用對稱密鑰。
適用於
另請參閱
意見反應
https://aka.ms/ContentUserFeedback。
即將登場:在 2024 年,我們將逐步淘汰 GitHub 問題作為內容的意見反應機制,並將它取代為新的意見反應系統。 如需詳細資訊,請參閱:提交並檢視相關的意見反應