public void Read (TProtocol iprot) { TField field; iprot.ReadStructBegin(); while (true) { field = iprot.ReadFieldBegin(); if (field.Type == TType.Stop) { break; } switch (field.ID) { case 10: if (field.Type == TType.Struct) { ArmyInfo = new NetFramework.Auto.ArmyInfo(); ArmyInfo.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 10: if (field.Type == TType.I32) { HandleType = (NetFramework.Auto.HandleApplyJoinType)iprot.ReadI32(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 20: if (field.Type == TType.String) { ArmyName = iprot.ReadString(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 30: if (field.Type == TType.Struct) { ArmyInfo = new NetFramework.Auto.ArmyInfo(); ArmyInfo.Read(iprot); } else { TProtocolUtil.Skip(iprot, field.Type); } break; default: TProtocolUtil.Skip(iprot, field.Type); break; } iprot.ReadFieldEnd(); } iprot.ReadStructEnd(); }