public void Read (TProtocol iprot) { bool isset_ks_def = false; TField field; iprot.ReadStructBegin(); while (true) { field = iprot.ReadFieldBegin(); if (field.Type == TType.Stop) { break; } switch (field.ID) { case 1: if (field.Type == TType.Struct) { Ks_def = new KsDef(); Ks_def.Read(iprot); isset_ks_def = true; } else { TProtocolUtil.Skip(iprot, field.Type); } break; default: TProtocolUtil.Skip(iprot, field.Type); break; } iprot.ReadFieldEnd(); } iprot.ReadStructEnd(); if (!isset_ks_def) throw new TProtocolException(TProtocolException.INVALID_DATA); }
public void Read (TProtocol iprot) { TField field; iprot.ReadStructBegin(); while (true) { field = iprot.ReadFieldBegin(); if (field.Type == TType.Stop) { break; } switch (field.ID) { case 0: if (field.Type == TType.List) { { Success = new List<KsDef>(); TList _list191 = iprot.ReadListBegin(); for( int _i192 = 0; _i192 < _list191.Count; ++_i192) { KsDef _elem193 = new KsDef(); _elem193 = new KsDef(); _elem193.Read(iprot); Success.Add(_elem193); } iprot.ReadListEnd(); } } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 1: if (field.Type == TType.Struct) { Ire = new InvalidRequestException(); Ire.Read(iprot); } 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 0: if (field.Type == TType.Struct) { Success = new KsDef(); Success.Read(iprot); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 1: if (field.Type == TType.Struct) { Nfe = new NotFoundException(); Nfe.Read(iprot); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 2: if (field.Type == TType.Struct) { Ire = new InvalidRequestException(); Ire.Read(iprot); } 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.Struct) { Ks_def = new KsDef(); Ks_def.Read(iprot); } else { TProtocolUtil.Skip(iprot, field.Type); } break; default: TProtocolUtil.Skip(iprot, field.Type); break; } iprot.ReadFieldEnd(); } iprot.ReadStructEnd(); }