Пример #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.I64) {
           UniqueId = iprot.ReadI64();
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 20:
         if (field.Type == TType.I32) {
           BuffId = iprot.ReadI32();
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 21:
         if (field.Type == TType.I16) {
           Level = iprot.ReadI16();
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 30:
         if (field.Type == TType.Bool) {
           ExecFunc = iprot.ReadBool();
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 40:
         if (field.Type == TType.List) {
           {
             TargetUniqueIdList = new List<long>();
             TList _list32 = iprot.ReadListBegin();
             for( int _i33 = 0; _i33 < _list32.Count; ++_i33)
             {
               long _elem34 = 0;
               _elem34 = iprot.ReadI64();
               TargetUniqueIdList.Add(_elem34);
             }
             iprot.ReadListEnd();
           }
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 50:
         if (field.Type == TType.Struct) {
           Context = new NetFramework.Auto.FuncContext();
           Context.Read(iprot);
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       default: 
         TProtocolUtil.Skip(iprot, field.Type);
         break;
     }
     iprot.ReadFieldEnd();
   }
   iprot.ReadStructEnd();
 }
Пример #2
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) {
           SceneId = iprot.ReadI32();
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 20:
         if (field.Type == TType.I32) {
           FuncId = iprot.ReadI32();
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 30:
         if (field.Type == TType.I64) {
           ThisUniqueId = iprot.ReadI64();
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 40:
         if (field.Type == TType.List) {
           {
             TargetUniqueIdList = new List<long>();
             TList _list0 = iprot.ReadListBegin();
             for( int _i1 = 0; _i1 < _list0.Count; ++_i1)
             {
               long _elem2 = 0;
               _elem2 = iprot.ReadI64();
               TargetUniqueIdList.Add(_elem2);
             }
             iprot.ReadListEnd();
           }
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 50:
         if (field.Type == TType.Struct) {
           Context = new NetFramework.Auto.FuncContext();
           Context.Read(iprot);
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       default: 
         TProtocolUtil.Skip(iprot, field.Type);
         break;
     }
     iprot.ReadFieldEnd();
   }
   iprot.ReadStructEnd();
 }