示例#1
0
        public static SEAT_SETTING decode(byte[] data)
        {
            SEAT_SETTING proto = newBuilder();

            proto.build(data);
            return(proto);
        }
示例#2
0
        public void build(byte[] data)
        {
            ByteBuffer buf = ByteBuffer.wrap(data);

            for (int i = 0; i < this.__flag.Length; i++)
            {
                this.__flag[i] = buf.get();
            }

            if (this.hasWinnertPos())
            {
                this.winnert_pos = buf.getInt();
            }

            if (this.hasSeatSetting())
            {
                int size = buf.getShort();
                for (int i = 0; i < size; i++)
                {
                    byte[] bytes = new byte[buf.getInt()];
                    buf.get(ref bytes, 0, bytes.Length);
                    this.seat_setting.Add(SEAT_SETTING.decode(bytes));
                }
            }
        }
示例#3
0
 public void addSeatSetting(SEAT_SETTING value)
 {
     if (!this.hasSeatSetting())
     {
         this.__flag[0] = (byte)(this.__flag[0] | 2);
     }
     this.seat_setting.Add(value);
 }