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.List) { { Hits = new List <RelatedNotesHit>(); TList _list68 = iprot.ReadListBegin(); for (int _i69 = 0; _i69 < _list68.Count; ++_i69) { RelatedNotesHit _elem70 = new RelatedNotesHit(); _elem70 = new RelatedNotesHit(); _elem70.Read(iprot); Hits.Add(_elem70); } iprot.ReadListEnd(); } } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 2: if (field.Type == TType.I32) { TotalNotes = iprot.ReadI32(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 3: if (field.Type == TType.I64) { SearchTime = iprot.ReadI64(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 4: if (field.Type == TType.String) { Query = iprot.ReadString(); } 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.List) { { Hits = new List<RelatedNotesHit>(); TList _list68 = iprot.ReadListBegin(); for( int _i69 = 0; _i69 < _list68.Count; ++_i69) { RelatedNotesHit _elem70 = new RelatedNotesHit(); _elem70 = new RelatedNotesHit(); _elem70.Read(iprot); Hits.Add(_elem70); } iprot.ReadListEnd(); } } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 2: if (field.Type == TType.I32) { TotalNotes = iprot.ReadI32(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 3: if (field.Type == TType.I64) { SearchTime = iprot.ReadI64(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 4: if (field.Type == TType.String) { Query = iprot.ReadString(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; default: TProtocolUtil.Skip(iprot, field.Type); break; } iprot.ReadFieldEnd(); } iprot.ReadStructEnd(); }