public void Read(SetSkuInventoryResult structs, Protocol iprot) { String schemeStruct = iprot.ReadStructBegin(); if (schemeStruct != null) { while (true) { String schemeField = iprot.ReadFieldBegin(); if (schemeField == null) { break; } bool needSkip = true; if ("successList".Equals(schemeField.Trim())) { needSkip = false; List <vipapis.sales.BarcodeInventory> value; value = new List <vipapis.sales.BarcodeInventory>(); iprot.ReadListBegin(); while (true) { try{ vipapis.sales.BarcodeInventory elem1; elem1 = new vipapis.sales.BarcodeInventory(); vipapis.sales.BarcodeInventoryHelper.getInstance().Read(elem1, iprot); value.Add(elem1); } catch (Exception e) { break; } } iprot.ReadListEnd(); structs.SetSuccessList(value); } if ("failedList".Equals(schemeField.Trim())) { needSkip = false; List <vipapis.sales.BarcodeMessage> value; value = new List <vipapis.sales.BarcodeMessage>(); iprot.ReadListBegin(); while (true) { try{ vipapis.sales.BarcodeMessage elem3; elem3 = new vipapis.sales.BarcodeMessage(); vipapis.sales.BarcodeMessageHelper.getInstance().Read(elem3, iprot); value.Add(elem3); } catch (Exception e) { break; } } iprot.ReadListEnd(); structs.SetFailedList(value); } if (needSkip) { ProtocolUtil.skip(iprot); } iprot.ReadFieldEnd(); } iprot.ReadStructEnd(); Validate(structs); } else { throw new OspException(); } }
public void Read(updateSalesSkusInventory_args structs, Protocol iprot) { if (true) { int value; value = iprot.ReadI32(); structs.SetBatch_no(value); } if (true) { int value; value = iprot.ReadI32(); structs.SetVendor_id(value); } if (true) { bool value; value = iprot.ReadBool(); structs.SetIs_full(value); } if (true) { string value; value = iprot.ReadString(); structs.SetWarehouse_supplier(value); } if (true) { List <vipapis.sales.BarcodeInventory> value; value = new List <vipapis.sales.BarcodeInventory>(); iprot.ReadListBegin(); while (true) { try{ vipapis.sales.BarcodeInventory elem0; elem0 = new vipapis.sales.BarcodeInventory(); vipapis.sales.BarcodeInventoryHelper.getInstance().Read(elem0, iprot); value.Add(elem0); } catch (Exception e) { break; } } iprot.ReadListEnd(); structs.SetInventories(value); } Validate(structs); }