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);
 }
Example #3
0
 public virtual void Load(Beetle.IDataReader reader)
 {
     ID = reader.ReadString();
 }
Example #4
0
 public override void Load(Beetle.IDataReader reader)
 {
     base.Load(reader);
     Name = reader.ReadString();           
 }
Example #5
0
 public void Load(Beetle.IDataReader reader)
 {
     Name = reader.ReadString();
     IP = reader.ReadString();
 }
Example #6
0
 public void Load(Beetle.IDataReader reader)
 {
     Name = reader.ReadString();
     EMail = reader.ReadString();
     ResponseTime = reader.ReadDateTime();
 }
Example #7
0
 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));
 }
Example #8
0
 public override void Load(Beetle.IDataReader reader)
 {
     base.Load(reader);
     User = reader.ReadMessage<UserInfo>();
     Body = reader.ReadString();
 }