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.Bool) { HasNext = iprot.ReadBool(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 4: if (field.Type == TType.I64) { BannerSequence = iprot.ReadI64(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 5: if (field.Type == TType.I32) { BannerTargetType = (ProductBannerLinkType)iprot.ReadI32(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 6: if (field.Type == TType.String) { BannerTargetPath = iprot.ReadString(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 7: if (field.Type == TType.List) { { ProductList_ = new List<Product>(); TList _list34 = iprot.ReadListBegin(); for( int _i35 = 0; _i35 < _list34.Count; ++_i35) { Product _elem36 = new Product(); _elem36 = new Product(); _elem36.Read(iprot); ProductList_.Add(_elem36); } iprot.ReadListEnd(); } } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 8: if (field.Type == TType.String) { BannerLang = 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 0: if (field.Type == TType.Struct) { Success = new Product(); Success.Read(iprot); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 1: if (field.Type == TType.Struct) { E = new TalkException(); E.Read(iprot); } else { TProtocolUtil.Skip(iprot, field.Type); } break; default: TProtocolUtil.Skip(iprot, field.Type); break; } iprot.ReadFieldEnd(); } iprot.ReadStructEnd(); }