public void Load(Beetle.BufferReader reader) { string type = reader.ReadString(); //Beetle.ByteArraySegment segment = mArrayPool.Pop(); byte[] data = reader.ReadByteArray(); using (System.IO.Stream stream = new System.IO.MemoryStream(data, 0, data.Length)) { Message = ProtoBuf.Meta.RuntimeTypeModel.Default.Deserialize(stream, null, Type.GetType(type)); } }
public void Load(Beetle.BufferReader reader) { string type = reader.ReadString(); Beetle.ByteArraySegment segment = mArrayPool.Pop(); reader.ReadByteArray(segment); using (System.IO.Stream stream = new System.IO.MemoryStream(segment.Array,0,segment.Count)) { Message = ProtoBuf.Meta.RuntimeTypeModel.Default.Deserialize(stream, null, Type.GetType(type)); } mArrayPool.Push(segment); }
public virtual void Load(Beetle.IDataReader reader) { ID = reader.ReadString(); }
public override void Load(Beetle.IDataReader reader) { base.Load(reader); Name = reader.ReadString(); }
public void Load(Beetle.IDataReader reader) { Name = reader.ReadString(); IP = reader.ReadString(); }
public void Load(Beetle.IDataReader reader) { Name = reader.ReadString(); EMail = reader.ReadString(); ResponseTime = reader.ReadDateTime(); }
public void Load(Beetle.IDataReader reader) { string type = reader.ReadUTF(); string data = reader.ReadString((int)(reader.Length-reader.Position)); Message = Newtonsoft.Json.JsonConvert.DeserializeObject(data, Package.GetType(type)); }
public override void Load(Beetle.IDataReader reader) { base.Load(reader); User = reader.ReadMessage<UserInfo>(); Body = reader.ReadString(); }