BinaryMessageFormatter.Clone 方法
定义
创建 BinaryMessageFormatter 类的实例,其读/写属性(根对象和类型说明格式)与当前 BinaryMessageFormatter 相同。Creates an instance of the BinaryMessageFormatter class whose read/write properties (the root object and type description formats) are the same as the current BinaryMessageFormatter.
public:
virtual System::Object ^ Clone();
public object Clone ();
abstract member Clone : unit -> obj
override this.Clone : unit -> obj
Public Function Clone () As Object
返回
一个对象,其属性与此 BinaryMessageFormatter 的属性相同,但其元数据并不将其指定为格式化程序类实例。An object whose properties are identical to those of this BinaryMessageFormatter, but whose metadata does not specify it to be a formatter class instance.
实现
注解
重要
使用不受信任的数据调用此类中的方法存在安全风险。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 。This method creates a copy of the formatter and initializes all its properties to the values of this BinaryMessageFormatter. 它用于可伸缩性,但不保证读取或写入线程安全。It is used for scalability, but does not guarantee read or write thread safety.