BinaryMessageFormatter 建構函式

定義

初始化 BinaryMessageFormatter 類別的新執行個體。Initializes a new instance of the BinaryMessageFormatter class.

多載

BinaryMessageFormatter()

初始化 BinaryMessageFormatter 類別的新執行個體,而不指定型別樣式或最上層物件組件樣式。Initializes a new instance of the BinaryMessageFormatter class without specifying a type style or top object assembly style.

BinaryMessageFormatter(FormatterAssemblyStyle, FormatterTypeStyle)

初始化 BinaryMessageFormatter 類別的新執行個體,指定根物件和型別描述的格式。Initializes a new instance of the BinaryMessageFormatter class, specifying the formats of the root object and the type descriptions.

備註

重要

使用不信任的資料呼叫此類別的方法,會造成安全性上的風險。Calling methods from this class with untrusted data is a security risk. 呼叫此類別的方法時,請一律使用信任的資料。Call the methods from this class only with trusted data. 如需詳細資訊,請參閱資料驗證For more information, see Data Validation.

BinaryMessageFormatter()

初始化 BinaryMessageFormatter 類別的新執行個體,而不指定型別樣式或最上層物件組件樣式。Initializes a new instance of the BinaryMessageFormatter class without specifying a type style or top object assembly style.

public:
 BinaryMessageFormatter();
public BinaryMessageFormatter ();
Public Sub New ()

備註

您必須指定屬性的值 TopObjectFormat (定義) 圖形中根物件的配置方式,以及 TypeFormat 定義在使用類別的實例 BinaryMessageFormatter 來序列化和傳送訊息之前,) 如何設定物件類型描述的屬性 (。You must specify values for the TopObjectFormat property (which defines how the root object in a graph is laid out) and the TypeFormat property (which defines how object type descriptions are laid out) before using an instance of the BinaryMessageFormatter class to serialize and send a message.

適用於

BinaryMessageFormatter(FormatterAssemblyStyle, FormatterTypeStyle)

初始化 BinaryMessageFormatter 類別的新執行個體,指定根物件和型別描述的格式。Initializes a new instance of the BinaryMessageFormatter class, specifying the formats of the root object and the type descriptions.

public:
 BinaryMessageFormatter(System::Runtime::Serialization::Formatters::FormatterAssemblyStyle topObjectFormat, System::Runtime::Serialization::Formatters::FormatterTypeStyle typeFormat);
public BinaryMessageFormatter (System.Runtime.Serialization.Formatters.FormatterAssemblyStyle topObjectFormat, System.Runtime.Serialization.Formatters.FormatterTypeStyle typeFormat);
new System.Messaging.BinaryMessageFormatter : System.Runtime.Serialization.Formatters.FormatterAssemblyStyle * System.Runtime.Serialization.Formatters.FormatterTypeStyle -> System.Messaging.BinaryMessageFormatter
Public Sub New (topObjectFormat As FormatterAssemblyStyle, typeFormat As FormatterTypeStyle)

參數

topObjectFormat
FormatterAssemblyStyle

決定如何在序列資料流中配置圖形的上層 (根) 物件。Determines how the top (root) object of a graph is laid out in the serialized stream.

typeFormat
FormatterTypeStyle

決定如何在序列資料流中配置型別描述。Determines how type descriptions are laid out in the serialized stream.

適用於