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) { CharId = iprot.ReadI32(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 20: if (field.Type == TType.List) { { CharMissionInfoList = new List <MissionInfo>(); TList _list25 = iprot.ReadListBegin(); for (int _i26 = 0; _i26 < _list25.Count; ++_i26) { MissionInfo _elem27 = new MissionInfo(); _elem27 = new MissionInfo(); _elem27.Read(iprot); CharMissionInfoList.Add(_elem27); } iprot.ReadListEnd(); } } else { TProtocolUtil.Skip(iprot, field.Type); } break; default: TProtocolUtil.Skip(iprot, field.Type); break; } iprot.ReadFieldEnd(); } iprot.ReadStructEnd(); }
public static MissionInfo DeepCopy(MissionInfo source) { MissionInfo elem = new MissionInfo(); elem.Counter = source.Counter; elem.MissionId = source.MissionId; elem.MissionStepInfoList = new List<MissionStepInfo>(); for (int i = 0; i < source.MissionStepInfoList.Count; ++i) { MissionStepInfo info = DeepCopy(source.MissionStepInfoList[i]); elem.MissionStepInfoList.Add(info); } return elem; }
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) { CharId = iprot.ReadI32(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 20: if (field.Type == TType.List) { { CharMissionInfoList = new List<MissionInfo>(); TList _list25 = iprot.ReadListBegin(); for( int _i26 = 0; _i26 < _list25.Count; ++_i26) { MissionInfo _elem27 = new MissionInfo(); _elem27 = new MissionInfo(); _elem27.Read(iprot); CharMissionInfoList.Add(_elem27); } iprot.ReadListEnd(); } } else { TProtocolUtil.Skip(iprot, field.Type); } break; default: TProtocolUtil.Skip(iprot, field.Type); break; } iprot.ReadFieldEnd(); } iprot.ReadStructEnd(); }