BinaryMessageFormatter 构造函数
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
初始化 BinaryMessageFormatter 类的新实例。
重载
| 名称 | 说明 |
|---|---|
| BinaryMessageFormatter() |
初始化类的新实例 BinaryMessageFormatter ,而无需指定类型样式或顶部对象程序集样式。 |
| BinaryMessageFormatter(FormatterAssemblyStyle, FormatterTypeStyle) |
初始化类的新实例 BinaryMessageFormatter ,指定根对象的格式和类型说明。 |
注解
重要
使用不受信任的数据调用此类中的方法存在安全风险。 仅在确保数据受信任的情况下,再从该类调用方法。 有关详细信息,请参阅验证所有输入。
BinaryMessageFormatter()
初始化类的新实例 BinaryMessageFormatter ,而无需指定类型样式或顶部对象程序集样式。
public:
BinaryMessageFormatter();
public BinaryMessageFormatter();
Public Sub New ()
注解
在使用类实例BinaryMessageFormatter序列化和发送消息之前,必须为属性(定义图形中的根对象布局方式)和TypeFormat属性(该属性定义对象类型说明的布局方式)指定值TopObjectFormat。
适用于
BinaryMessageFormatter(FormatterAssemblyStyle, FormatterTypeStyle)
初始化类的新实例 BinaryMessageFormatter ,指定根对象的格式和类型说明。
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
确定图形的顶部(根)对象如何在序列化流中布局。
- typeFormat
- FormatterTypeStyle
确定如何在序列化流中布局类型说明。