ISerializable

Description

interface Tinman.Core.IO.Serialization.ISerializable

A class that supports serialization must implement this interface.

Every solid (i.e. non-abstract) class that implements the ISerializable interface must provide a public default constructor.

Public / Methods

Deserialize


public method Deserialize → (2)

serialVersion in : int32

[>=1]
The serial data version.

data in : ISerializer

[not-null]
The serial data stream.

returns → ISerializable

The deserialized object. This will typically be this, but in some circumstances, another instance may be returned (e.g. singletons).

Initializes the state of this object from the given data stream.

The Deserialize method will be called immediately after the object has been instantiated via its default constructor.

The provided serialVersion in number is guaranteed to be equal to or less than the SerialVersion returned by this object (i.e. ISerializable object must provide backwards compatibility).

IOException

If an I/O error has occurred.

Serialize


public method Serialize → (1)

data in : ISerializer

[not-null]
The serial data stream.

Serializes the current state of this object to the given data stream.

IOException

If an I/O error has occurred.

Public / Attributes

SerialType


public attribute SerialType → (get)

value : ISerialTypeInfo

[not-null]
The serial type.

Returns the serial type of this object.

SerialVersion


public attribute SerialVersion → (get)

value : int32

[>=1]
The serial data version tag.

Returns the serial data version.

An ISerializable implementation is required to support all versions up to the one returned by SerialVersion.