IFormatter.Context 属性
定义
获取或设置用于序列化和反序列化的 StreamingContext。Gets or sets the StreamingContext used for serialization and deserialization.
public:
property System::Runtime::Serialization::StreamingContext Context { System::Runtime::Serialization::StreamingContext get(); void set(System::Runtime::Serialization::StreamingContext value); };
public System.Runtime.Serialization.StreamingContext Context { get; set; }
member this.Context : System.Runtime.Serialization.StreamingContext with get, set
Public Property Context As StreamingContext
属性值
用于序列化和反序列化的 StreamingContext。The StreamingContext used for serialization and deserialization.
注解
此属性的值将传递给实现或的任何 ISerializable 对象 ISerializationSurrogate 。The value of this property is passed to any object implementing ISerializable or ISerializationSurrogate. StreamingContext指示在序列化期间) 或源 (期间 (数据的反序列) 化过程中的目标。The StreamingContext indicates the destination (during serialization) or the source (during deserialization) of the data. 实现的对象 ISerializable 可根据的值更改其传输的数据 Context 。An object implementing ISerializable can alter the data that it transmits depending on value of the Context.