SimpleSerializer.cs 539 B

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