C# Class Protogame.ModelSerializerGeneric

Serializes and deserializes IModel for storage in a binary format.
Inheritance: IModelSerializer
Show file Open project: RedpointGames/Protogame

Public Methods

Method Description
Deserialize ( string name, byte data ) : Model

Deserialize the specified byte array into a concrete Model implementation.

ModelSerializerGeneric ( ModelSerializerVersion1 modelSerializerVersion1, ModelSerializerVersion2 modelSerializerVersion2, ModelSerializerVersion3 modelSerializerVersion3, ModelSerializerVersion4 modelSerializerVersion4 ) : System
Serialize ( IModel model ) : byte[]

Serializes the specified IModel into a byte array.

Method Details

Deserialize() public method

Deserialize the specified byte array into a concrete Model implementation.
public Deserialize ( string name, byte data ) : Model
name string
data byte /// The byte array to deserialize. ///
return Model

ModelSerializerGeneric() public method

public ModelSerializerGeneric ( ModelSerializerVersion1 modelSerializerVersion1, ModelSerializerVersion2 modelSerializerVersion2, ModelSerializerVersion3 modelSerializerVersion3, ModelSerializerVersion4 modelSerializerVersion4 ) : System
modelSerializerVersion1 ModelSerializerVersion1
modelSerializerVersion2 ModelSerializerVersion2
modelSerializerVersion3 ModelSerializerVersion3
modelSerializerVersion4 ModelSerializerVersion4
return System

Serialize() public method

Serializes the specified IModel into a byte array.
public Serialize ( IModel model ) : byte[]
model IModel /// The model to serialize. ///
return byte[]