12345678910111213141516171819 |
- using H.Formatters;
- using MemoryPack;
- namespace InABox.Formatters
- {
- public class MemoryPackFormatter<T1> : FormatterBase
- {
- protected override byte[] SerializeInternal(object obj)
- {
- return MemoryPackSerializer.Serialize<T1>((T1)obj);
- }
- protected override T DeserializeInternal<T>(byte[] bytes)
- {
- return MemoryPackSerializer.Deserialize<T>(bytes);
- }
- }
- }
|