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.hasRecord()) { 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.record.Add(OP_CLUB_RECORD.decode(bytes)); } } if (this.hasClubId()) { this.clubId = buf.getInt(); } }
public static OP_CLUB_RECORD decode(byte[] data) { OP_CLUB_RECORD proto = newBuilder(); proto.build(data); return(proto); }
public void addRecord(OP_CLUB_RECORD value) { if (!this.hasRecord()) { this.__flag[0] = (byte)(this.__flag[0] | 1); } this.record.Add(value); }