Example #1
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.Struct) {
           HeroInfo = new NetFramework.Auto.HeroInfo();
           HeroInfo.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.Struct) {
           HeroInfo = new NetFramework.Auto.HeroInfo();
           HeroInfo.Read(iprot);
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 20:
         if (field.Type == TType.List) {
           {
             HeroEquipmentInfo = new List<NetFramework.Auto.HeroEquipmentInfo>();
             TList _list0 = iprot.ReadListBegin();
             for( int _i1 = 0; _i1 < _list0.Count; ++_i1)
             {
               NetFramework.Auto.HeroEquipmentInfo _elem2 = new NetFramework.Auto.HeroEquipmentInfo();
               _elem2 = new NetFramework.Auto.HeroEquipmentInfo();
               _elem2.Read(iprot);
               HeroEquipmentInfo.Add(_elem2);
             }
             iprot.ReadListEnd();
           }
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       default: 
         TProtocolUtil.Skip(iprot, field.Type);
         break;
     }
     iprot.ReadFieldEnd();
   }
   iprot.ReadStructEnd();
 }
Example #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 1:
         if (field.Type == TType.List) {
           {
             PropsInfoList = new List<NetFramework.Auto.PropsInfo>();
             TList _list32 = iprot.ReadListBegin();
             for( int _i33 = 0; _i33 < _list32.Count; ++_i33)
             {
               NetFramework.Auto.PropsInfo _elem34 = new NetFramework.Auto.PropsInfo();
               _elem34 = new NetFramework.Auto.PropsInfo();
               _elem34.Read(iprot);
               PropsInfoList.Add(_elem34);
             }
             iprot.ReadListEnd();
           }
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 2:
         if (field.Type == TType.List) {
           {
             HeroInfoList = new List<NetFramework.Auto.HeroInfo>();
             TList _list35 = iprot.ReadListBegin();
             for( int _i36 = 0; _i36 < _list35.Count; ++_i36)
             {
               NetFramework.Auto.HeroInfo _elem37 = new NetFramework.Auto.HeroInfo();
               _elem37 = new NetFramework.Auto.HeroInfo();
               _elem37.Read(iprot);
               HeroInfoList.Add(_elem37);
             }
             iprot.ReadListEnd();
           }
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 3:
         if (field.Type == TType.List) {
           {
             HeroEquipmentInfoList = new List<NetFramework.Auto.HeroEquipmentInfo>();
             TList _list38 = iprot.ReadListBegin();
             for( int _i39 = 0; _i39 < _list38.Count; ++_i39)
             {
               NetFramework.Auto.HeroEquipmentInfo _elem40 = new NetFramework.Auto.HeroEquipmentInfo();
               _elem40 = new NetFramework.Auto.HeroEquipmentInfo();
               _elem40.Read(iprot);
               HeroEquipmentInfoList.Add(_elem40);
             }
             iprot.ReadListEnd();
           }
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 4:
         if (field.Type == TType.List) {
           {
             CharBodyEquipmentInfoList = new List<NetFramework.Auto.CharEquipmentInfo>();
             TList _list41 = iprot.ReadListBegin();
             for( int _i42 = 0; _i42 < _list41.Count; ++_i42)
             {
               NetFramework.Auto.CharEquipmentInfo _elem43 = new NetFramework.Auto.CharEquipmentInfo();
               _elem43 = new NetFramework.Auto.CharEquipmentInfo();
               _elem43.Read(iprot);
               CharBodyEquipmentInfoList.Add(_elem43);
             }
             iprot.ReadListEnd();
           }
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 5:
         if (field.Type == TType.List) {
           {
             GemInfoList = new List<NetFramework.Auto.GemInfo>();
             TList _list44 = iprot.ReadListBegin();
             for( int _i45 = 0; _i45 < _list44.Count; ++_i45)
             {
               NetFramework.Auto.GemInfo _elem46 = new NetFramework.Auto.GemInfo();
               _elem46 = new NetFramework.Auto.GemInfo();
               _elem46.Read(iprot);
               GemInfoList.Add(_elem46);
             }
             iprot.ReadListEnd();
           }
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       default: 
         TProtocolUtil.Skip(iprot, field.Type);
         break;
     }
     iprot.ReadFieldEnd();
   }
   iprot.ReadStructEnd();
 }