Esempio n. 1
0
        public byte[] ToBytes()
        {
            var msgpack = new SimpleMsgPack.MsgPack();

            msgpack.ForcePathObject("RoomNumber").AsInteger = RoomNumber;
            byte[] packData = msgpack.Encode2Bytes();
            return(packData);
        }
Esempio n. 2
0
        public bool FromBytes(byte[] bodyData)
        {
            var unpack_msgpack = new SimpleMsgPack.MsgPack();

            unpack_msgpack.DecodeFromBytes(bodyData);
            Result = unpack_msgpack.ForcePathObject("Result").AsInteger;
            return(true);
        }
Esempio n. 3
0
        public byte[] ToBytes()
        {
            var msgpack = new SimpleMsgPack.MsgPack();

            msgpack.ForcePathObject("Msg").AsString = Msg;
            byte[] packData = msgpack.Encode2Bytes();
            return(packData);
        }
Esempio n. 4
0
        public bool FromBytes(byte[] bodyData)
        {
            var unpack_msgpack = new SimpleMsgPack.MsgPack();

            unpack_msgpack.DecodeFromBytes(bodyData);

            ErrorCode = (ERROR_CODE)unpack_msgpack.ForcePathObject("ErrorCode").AsInteger;
            return(true);
        }
Esempio n. 5
0
        public bool FromBytes(byte[] bodyData)
        {
            var unpack_msgpack = new SimpleMsgPack.MsgPack();

            unpack_msgpack.DecodeFromBytes(bodyData);

            UserUniqueId = (UInt64)unpack_msgpack.ForcePathObject("UserUniqueId").AsInteger;
            Msg          = unpack_msgpack.ForcePathObject("Msg").AsString;
            return(true);
        }
Esempio n. 6
0
        public bool FromBytes(byte[] bodyData)
        {
            var unpack_msgpack = new SimpleMsgPack.MsgPack();

            unpack_msgpack.DecodeFromBytes(bodyData);

            UserCount = unpack_msgpack.ForcePathObject("UserCount").AsInteger;

            foreach (SimpleMsgPack.MsgPack item in unpack_msgpack.ForcePathObject("UniqueId"))
            {
                UserUniqueIdList.Add((UInt64)item.GetAsInteger());
            }

            foreach (SimpleMsgPack.MsgPack item in unpack_msgpack.ForcePathObject("ID"))
            {
                UserIDList.Add(item.AsString);
            }

            return(true);
        }