using ZeroLevel.Services.Serialization; namespace ZeroLevel.Services.Network { public class LongRequest : IBinarySerializable { public LongRequest() { } public LongRequest Create(T value, string inbox) => new LongRequest { Body = value, Inbox = inbox }; public T Body { get; set; } public string Inbox { get; set; } public void Deserialize(IBinaryReader reader) { this.Inbox = reader.ReadString(); this.Body = reader.ReadCompatible(); } public void Serialize(IBinaryWriter writer) { writer.WriteString(this.Inbox); writer.WriteCompatible(this.Body); } } }