예제 #1
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));
            }
예제 #2
0
        protected override Beetle.IMessage ReadMessageByType(Beetle.IDataReader reader, Beetle.ReadObjectInfo typeTag)
        {
            Adapter adapter = new Adapter();

            typeTag.TypeofString = "Adapter";
            return(adapter);
        }
예제 #3
0
        protected override Beetle.IMessage ReadMessageByType(Beetle.IDataReader reader, Beetle.ReadObjectInfo typeTag)
        {
            typeTag.TypeOfInt = reader.ReadInt();
            switch (typeTag.TypeOfInt)
            {
            case 1:
                return(new ListUsers());

            case 2:
                return(new ListUsersResponse());

            case 3:
                return(new Register());

            case 4:
                return(new UnRegister());

            case 5:
                return(new RegisterResponse());

            case 6:
                return(new Say());

            case 7:
                return(new OnRegister());

            default:
                return(null);
            }
        }
예제 #4
0
 protected override Beetle.IMessage ReadMessageByType(Beetle.IDataReader reader, Beetle.ReadObjectInfo typeTag)
 {
     typeTag.TypeofString = reader.ReadUTF();
     switch (typeTag.TypeofString)
     {
     case "Register":
         return(new Register());
     }
     return(null);
 }
예제 #5
0
        public void Load(Beetle.IDataReader reader)
        {
            Name    = reader.ReadUTF();
            EMail   = reader.ReadUTF();
            City    = reader.ReadUTF();
            Country = reader.ReadUTF();
            string date = reader.ReadUTF();

            Console.WriteLine(date);
            RegTime = DateTime.ParseExact(date, "yyyy-MM-dd HH:mm:ss", CultureInfo.InvariantCulture);
        }
예제 #6
0
            public void Load(Beetle.IDataReader reader)
            {
                string type = reader.ReadUTF();

                Message = ProtoBuf.Meta.RuntimeTypeModel.Default.Deserialize((Stream)reader, null, Package.GetType(type));
            }
예제 #7
0
 public virtual void Load(Beetle.IDataReader reader)
 {
     ID = reader.ReadString();
 }
예제 #8
0
            public void Load(Beetle.IDataReader reader)
            {
                BinaryFormatter bf = new BinaryFormatter();

                Message = bf.Deserialize((Stream)reader);
            }
예제 #9
0
 public void Load(Beetle.IDataReader reader)
 {
     Name         = reader.ReadUTF();
     EMail        = reader.ReadUTF();
     ResponseTime = reader.ReadDateTime();
 }
예제 #10
0
 public override void Load(Beetle.IDataReader reader)
 {
     base.Load(reader);
     Name = reader.ReadString();
 }
예제 #11
0
 public override void Load(Beetle.IDataReader reader)
 {
     base.Load(reader);
     User = reader.ReadMessage <UserInfo>();
 }
예제 #12
0
 public void Load(Beetle.IDataReader reader)
 {
     Name = reader.ReadString();
     IP   = reader.ReadString();
 }