public void Read(TProtocol iprot) { TField field; iprot.ReadStructBegin(); while (true) { field = iprot.ReadFieldBegin(); if (field.Type == TType.Stop) { break; } switch (field.ID) { case 1: if (field.Type == TType.I32) { this.space_id = iprot.ReadI32(); this.__isset.space_id = true; } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 2: if (field.Type == TType.I64) { this.id = iprot.ReadI64(); this.__isset.id = true; } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 3: if (field.Type == TType.List) { { this.host_del = new List <nebula.HostAddr>(); TList _list141 = iprot.ReadListBegin(); for (int _i142 = 0; _i142 < _list141.Count; ++_i142) { nebula.HostAddr _elem143 = new nebula.HostAddr(); _elem143 = new nebula.HostAddr(); _elem143.Read(iprot); this.host_del.Add(_elem143); } iprot.ReadListEnd(); } this.__isset.host_del = true; } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 4: if (field.Type == TType.Bool) { this.stop = iprot.ReadBool(); this.__isset.stop = true; } else { TProtocolUtil.Skip(iprot, field.Type); } break; default: TProtocolUtil.Skip(iprot, field.Type); break; } iprot.ReadFieldEnd(); } iprot.ReadStructEnd(); }
public void Read(TProtocol iprot) { TField field; iprot.ReadStructBegin(); while (true) { field = iprot.ReadFieldBegin(); if (field.Type == TType.Stop) { break; } switch (field.ID) { case 1: if (field.Type == TType.I32) { this.part_id = iprot.ReadI32(); this.__isset.part_id = true; } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 2: if (field.Type == TType.Struct) { this.leader = new nebula.HostAddr(); this.leader.Read(iprot); this.__isset.leader = true; } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 3: if (field.Type == TType.List) { { this.peers = new List <nebula.HostAddr>(); TList _list66 = iprot.ReadListBegin(); for (int _i67 = 0; _i67 < _list66.Count; ++_i67) { nebula.HostAddr _elem68 = new nebula.HostAddr(); _elem68 = new nebula.HostAddr(); _elem68.Read(iprot); this.peers.Add(_elem68); } iprot.ReadListEnd(); } this.__isset.peers = true; } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 4: if (field.Type == TType.List) { { this.losts = new List <nebula.HostAddr>(); TList _list69 = iprot.ReadListBegin(); for (int _i70 = 0; _i70 < _list69.Count; ++_i70) { nebula.HostAddr _elem71 = new nebula.HostAddr(); _elem71 = new nebula.HostAddr(); _elem71.Read(iprot); this.losts.Add(_elem71); } iprot.ReadListEnd(); } this.__isset.losts = true; } else { TProtocolUtil.Skip(iprot, field.Type); } break; default: TProtocolUtil.Skip(iprot, field.Type); break; } iprot.ReadFieldEnd(); } iprot.ReadStructEnd(); }
public void Read(TProtocol iprot) { TField field; iprot.ReadStructBegin(); while (true) { field = iprot.ReadFieldBegin(); if (field.Type == TType.Stop) { break; } switch (field.ID) { case 1: if (field.Type == TType.I32) { this.code = (ErrorCode)iprot.ReadI32(); this.__isset.code = true; } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 2: if (field.Type == TType.Struct) { this.leader = new nebula.HostAddr(); this.leader.Read(iprot); this.__isset.leader = true; } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 3: if (field.Type == TType.Map) { { this.parts = new Dictionary <int, List <nebula.HostAddr> >(); TMap _map82 = iprot.ReadMapBegin(); for (int _i83 = 0; _i83 < _map82.Count; ++_i83) { int _key84; List <nebula.HostAddr> _val85; _key84 = iprot.ReadI32(); { _val85 = new List <nebula.HostAddr>(); TList _list86 = iprot.ReadListBegin(); for (int _i87 = 0; _i87 < _list86.Count; ++_i87) { nebula.HostAddr _elem88 = new nebula.HostAddr(); _elem88 = new nebula.HostAddr(); _elem88.Read(iprot); _val85.Add(_elem88); } iprot.ReadListEnd(); } this.parts[_key84] = _val85; } iprot.ReadMapEnd(); } this.__isset.parts = true; } else { TProtocolUtil.Skip(iprot, field.Type); } break; default: TProtocolUtil.Skip(iprot, field.Type); break; } iprot.ReadFieldEnd(); } iprot.ReadStructEnd(); }
public void Read(TProtocol iprot) { TField field; iprot.ReadStructBegin(); while (true) { field = iprot.ReadFieldBegin(); if (field.Type == TType.Stop) { break; } switch (field.ID) { case 1: if (field.Type == TType.I32) { this.space_id = iprot.ReadI32(); this.__isset.space_id = true; } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 2: if (field.Type == TType.I32) { this.part_id = iprot.ReadI32(); this.__isset.part_id = true; } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 3: if (field.Type == TType.List) { { this.peers = new List <nebula.HostAddr>(); TList _list200 = iprot.ReadListBegin(); for (int _i201 = 0; _i201 < _list200.Count; ++_i201) { nebula.HostAddr _elem202 = new nebula.HostAddr(); _elem202 = new nebula.HostAddr(); _elem202.Read(iprot); this.peers.Add(_elem202); } iprot.ReadListEnd(); } this.__isset.peers = true; } else { TProtocolUtil.Skip(iprot, field.Type); } break; default: TProtocolUtil.Skip(iprot, field.Type); break; } iprot.ReadFieldEnd(); } iprot.ReadStructEnd(); }