public static MissionStepInfo DeepCopy(MissionStepInfo source)
 {
     MissionStepInfo elem = new MissionStepInfo();
     elem.Counter = source.Counter;
     elem.StepId = elem.StepId;
     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) {
           MissionId = iprot.ReadI32();
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 20:
         if (field.Type == TType.List) {
           {
             MissionStepInfoList = new List<MissionStepInfo>();
             TList _list21 = iprot.ReadListBegin();
             for( int _i22 = 0; _i22 < _list21.Count; ++_i22)
             {
               MissionStepInfo _elem23 = new MissionStepInfo();
               _elem23 = new MissionStepInfo();
               _elem23.Read(iprot);
               MissionStepInfoList.Add(_elem23);
             }
             iprot.ReadListEnd();
           }
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 30:
         if (field.Type == TType.I32) {
           Counter = iprot.ReadI32();
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       default: 
         TProtocolUtil.Skip(iprot, field.Type);
         break;
     }
     iprot.ReadFieldEnd();
   }
   iprot.ReadStructEnd();
 }
Exemple #3
0
        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)
                    {
                        MissionId = iprot.ReadI32();
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                case 20:
                    if (field.Type == TType.List)
                    {
                        {
                            MissionStepInfoList = new List <MissionStepInfo>();
                            TList _list21 = iprot.ReadListBegin();
                            for (int _i22 = 0; _i22 < _list21.Count; ++_i22)
                            {
                                MissionStepInfo _elem23 = new MissionStepInfo();
                                _elem23 = new MissionStepInfo();
                                _elem23.Read(iprot);
                                MissionStepInfoList.Add(_elem23);
                            }
                            iprot.ReadListEnd();
                        }
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                case 30:
                    if (field.Type == TType.I32)
                    {
                        Counter = iprot.ReadI32();
                    }
                    else
                    {
                        TProtocolUtil.Skip(iprot, field.Type);
                    }
                    break;

                default:
                    TProtocolUtil.Skip(iprot, field.Type);
                    break;
                }
                iprot.ReadFieldEnd();
            }
            iprot.ReadStructEnd();
        }