using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Tango.Serialization { /// /// Represent an interface for creating a custom data serializer. /// public interface IDataSerializer { /// /// Serialize object to a file. /// /// Type of specified object. /// The specified object. /// The full path to the file to write. void SerializeToFile(T obj, String filePath); /// /// Deserialize object from a file. /// /// Type of object to deserialize. /// The full path of the data file. /// The resulting object. T DeserializeFromFile(String filePath); /// /// Serialize object to stream. /// /// Type of specified object. /// The specified object. /// The stream to write. void SerializeToStream(T obj, Stream st); /// /// Deserialize object from stream. /// /// Type of object to deserialize. /// Stream to read from. /// The resulting object. T DeserializeFromStream(Stream st); } }