using ZeroLevel.Services.Serialization; namespace ZeroLevel.Network.SDL { public class InboxServiceDescription : IBinarySerializable { public int Port { get; set; } /// /// Inbox name /// public string Name { get; set; } /// /// Invoke targer type name /// public string Target { get; set; } /// /// Inbox kind (handler or requestor) /// public InboxKind InboxKind { get; set; } /// /// Inbox Incoming data type /// public InboxType IncomingType { get; set; } /// /// Inbox Outcoming data type /// public InboxType OutcomingType { get; set; } public void Deserialize(IBinaryReader reader) { this.Port = reader.ReadInt32(); this.Name = reader.ReadString(); this.Target = reader.ReadString(); this.InboxKind = (InboxKind)reader.ReadInt32(); this.IncomingType = reader.Read(); this.OutcomingType = reader.Read(); } public void Serialize(IBinaryWriter writer) { writer.WriteInt32(this.Port); writer.WriteString(this.Name); writer.WriteString(this.Target); writer.WriteInt32((int)this.InboxKind); writer.Write(this.IncomingType); writer.Write(this.OutcomingType); } } }