public interface IFormatter
|
Objects controlling their own serialization can do so by implementing the ISerializable interface. In order for an object to be serialized, you must mark that object as being serializable. You can do this by applying the serializable attribute to a class. If any object in the graph is not serializable, serialization will fail.
Binder | Read-write Gets or sets the SerializationBinder that performs type lookups during deserialization. |
Context | Read-write Gets or sets the StreamingContext used for serialization and deserialization. |
SurrogateSelector | Read-write Gets or sets the SurrogateSelector used by the current formatter. |
Deserialize | Deserializes the data on the provided stream and reconstitutes the graph of objects. |
Serialize | Serializes an object, or graph of objects with the given root to the provided stream. |
SerializationBinder Binder {get; set;}
|
Setting this property has no effect during serialization.
StreamingContext Context {get; set;}
|
ISurrogateSelector SurrogateSelector {get; set;}
|
serializationStream
The deserialization process allocates an empty object of the appropriate type and repopulates its fields from the data transmitted in the serializationStream stream. It is important to note that no constructor is ever called on the object during deserialization.
serializationStream
graph
By default, the serialization process records an object's state by gathering the values of all its fields (public and private). These fields are saved to the stream along with information about the object such as the assembly-qualified name for its type.