Пример #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 0:
       if (field.Type == TType.List) {
     {
       this.success = new List<TokenRange>();
       TList _list86 = iprot.ReadListBegin();
       for( int _i87 = 0; _i87 < _list86.Count; ++_i87)
       {
         TokenRange _elem88 = new TokenRange();
         _elem88 = new TokenRange();
         _elem88.Read(iprot);
         this.success.Add(_elem88);
       }
       iprot.ReadListEnd();
     }
     this.__isset.success = true;
       } 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 0:
       if (field.Type == TType.List) {
     {
       Success = new List<TokenRange>();
       TList _list144 = iprot.ReadListBegin();
       for( int _i145 = 0; _i145 < _list144.Count; ++_i145)
       {
         TokenRange _elem146 = new TokenRange();
         _elem146 = new TokenRange();
         _elem146.Read(iprot);
         Success.Add(_elem146);
       }
       iprot.ReadListEnd();
     }
       } else {
     TProtocolUtil.Skip(iprot, field.Type);
       }
       break;
     case 1:
       if (field.Type == TType.Struct) {
     Ire = new InvalidRequestException();
     Ire.Read(iprot);
       } else {
     TProtocolUtil.Skip(iprot, field.Type);
       }
       break;
     default:
       TProtocolUtil.Skip(iprot, field.Type);
       break;
       }
       iprot.ReadFieldEnd();
     }
     iprot.ReadStructEnd();
 }
Пример #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 0:
       if (field.Type == TType.List) {
     {
       this.success = new List<TokenRange>();
       TList _list99 = iprot.ReadListBegin();
       for( int _i100 = 0; _i100 < _list99.Count; ++_i100)
       {
         TokenRange _elem101 = new TokenRange();
         _elem101 = new TokenRange();
         _elem101.Read(iprot);
         this.success.Add(_elem101);
       }
       iprot.ReadListEnd();
     }
     this.__isset.success = true;
       } else {
     TProtocolUtil.Skip(iprot, field.Type);
       }
       break;
     case 1:
       if (field.Type == TType.Struct) {
     this.ire = new InvalidRequestException();
     this.ire.Read(iprot);
     this.__isset.ire = true;
       } else {
     TProtocolUtil.Skip(iprot, field.Type);
       }
       break;
     default:
       TProtocolUtil.Skip(iprot, field.Type);
       break;
       }
       iprot.ReadFieldEnd();
     }
     iprot.ReadStructEnd();
 }