Share via


MsmqIntegrationBindingElement.TargetSerializationTypes 屬性

定義

取得或設定 Type 物件的陣列,其中包含訊息還原序列化後應該產生的類型。

public:
 property cli::array <Type ^> ^ TargetSerializationTypes { cli::array <Type ^> ^ get(); void set(cli::array <Type ^> ^ value); };
public Type[] TargetSerializationTypes { get; set; }
member this.TargetSerializationTypes : Type[] with get, set
Public Property TargetSerializationTypes As Type()

屬性值

Type[]

Type 的陣列,其中包含訊息還原序列化後應該產生的類型。

範例

MsmqIntegrationBindingElement msmqBindingElement = new MsmqIntegrationBindingElement();
msmqBindingElement.TargetSerializationTypes = new Type[] { typeof(string) };

備註

MSMQ 訊息的本文是不具類型的。 屬性 TargetSerializationTypes 可讓您指定從 MSMQ 應用程式傳送至 Windows Communication Foundation (WCF) 接收應用程式時,訊息還原序列化的型別。 這個屬性只能在 MsmqMessageSerializationFormat 設定為 Xml 時使用。

適用於