Example #1
0
            public void Read(getBrandInfo_result structs, Protocol iprot)
            {
                if (true)
                {
                    vipapis.brand.BrandInfo value;

                    value = new vipapis.brand.BrandInfo();
                    vipapis.brand.BrandInfoHelper.getInstance().Read(value, iprot);

                    structs.SetSuccess(value);
                }



                Validate(structs);
            }
Example #2
0
 public void SetSuccess(vipapis.brand.BrandInfo value)
 {
     this.success_ = value;
 }
		public void Read(MultiGetBrandResponse structs, Protocol iprot){
			
			
			String schemeStruct = iprot.ReadStructBegin();
			if(schemeStruct != null){
				
				while(true){
					
					String schemeField = iprot.ReadFieldBegin();
					if (schemeField == null) break;
					bool needSkip = true;
					
					
					if ("brands".Equals(schemeField.Trim())){
						
						needSkip = false;
						List<vipapis.brand.BrandInfo> value;
						
						value = new List<vipapis.brand.BrandInfo>();
						iprot.ReadListBegin();
						while(true){
							
							try{
								
								vipapis.brand.BrandInfo elem0;
								
								elem0 = new vipapis.brand.BrandInfo();
								vipapis.brand.BrandInfoHelper.getInstance().Read(elem0, iprot);
								
								value.Add(elem0);
							}
							catch(Exception e){
								
								
								break;
							}
						}
						
						iprot.ReadListEnd();
						
						structs.SetBrands(value);
					}
					
					
					
					
					
					if ("total".Equals(schemeField.Trim())){
						
						needSkip = false;
						int value;
						value = iprot.ReadI32(); 
						
						structs.SetTotal(value);
					}
					
					
					
					
					if(needSkip){
						
						ProtocolUtil.skip(iprot);
					}
					
					iprot.ReadFieldEnd();
				}
				
				iprot.ReadStructEnd();
				Validate(structs);
			}
			else{
				
				throw new OspException();
			}
			
			
		}