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.

适用于