Serializer.cs 544 B

123456789101112131415
  1. using System.IO;
  2. namespace COM3D2.MeidoPhotoStudio.Plugin
  3. {
  4. public abstract class Serializer<T> : ISerializer
  5. {
  6. void ISerializer.Serialize(object obj, BinaryWriter writer) => Serialize((T) obj, writer);
  7. void ISerializer.Deserialize(object obj, BinaryReader reader, SceneMetadata metadata)
  8. => Deserialize((T) obj, reader, metadata);
  9. public abstract void Serialize(T obj, BinaryWriter writer);
  10. public abstract void Deserialize(T obj, BinaryReader reader, SceneMetadata metadata);
  11. }
  12. }