Read() public méthode

public Read ( TProtocol iprot ) : void
iprot Thrift.Protocol.TProtocol
Résultat void
Exemple #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 1:
                 if (field.Type == TType.String)
                 {
                     this.TableName = iprot.ReadBinary();
                 }
                 else
                 {
                     TProtocolUtil.Skip(iprot, field.Type);
                 }
                 break;
             case 2:
                 if (field.Type == TType.List)
                 {
                     {
                         this.ColumnFamilies = new List<ColumnDescriptor>();
                         TList _list26 = iprot.ReadListBegin();
                         for (int _i27 = 0; _i27 < _list26.Count; ++_i27)
                         {
                             var _elem28 = new ColumnDescriptor();
                             _elem28 = new ColumnDescriptor();
                             _elem28.Read(iprot);
                             this.ColumnFamilies.Add(_elem28);
                         }
                         iprot.ReadListEnd();
                     }
                 }
                 else
                 {
                     TProtocolUtil.Skip(iprot, field.Type);
                 }
                 break;
             default:
                 TProtocolUtil.Skip(iprot, field.Type);
                 break;
         }
         iprot.ReadFieldEnd();
     }
     iprot.ReadStructEnd();
 }
Exemple #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 0:
                 if (field.Type == TType.Map)
                 {
                     {
                         this.Success = new Dictionary<byte[], ColumnDescriptor>();
                         TMap _map17 = iprot.ReadMapBegin();
                         for (int _i18 = 0; _i18 < _map17.Count; ++_i18)
                         {
                             byte[] _key19;
                             ColumnDescriptor _val20;
                             _key19 = iprot.ReadBinary();
                             _val20 = new ColumnDescriptor();
                             _val20.Read(iprot);
                             this.Success[_key19] = _val20;
                         }
                         iprot.ReadMapEnd();
                     }
                 }
                 else
                 {
                     TProtocolUtil.Skip(iprot, field.Type);
                 }
                 break;
             case 1:
                 if (field.Type == TType.Struct)
                 {
                     this.Io = new IOError();
                     this.Io.Read(iprot);
                 }
                 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 0:
         if (field.Type == TType.Map) {
           {
             Success = new Dictionary<byte[], ColumnDescriptor>();
             TMap _map29 = iprot.ReadMapBegin();
             for( int _i30 = 0; _i30 < _map29.Count; ++_i30)
             {
               byte[] _key31;
               ColumnDescriptor _val32;
               _key31 = iprot.ReadBinary();
               _val32 = new ColumnDescriptor();
               _val32.Read(iprot);
               Success[_key31] = _val32;
             }
             iprot.ReadMapEnd();
           }
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 1:
         if (field.Type == TType.Struct) {
           Io = new IOError();
           Io.Read(iprot);
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       default: 
         TProtocolUtil.Skip(iprot, field.Type);
         break;
     }
     iprot.ReadFieldEnd();
   }
   iprot.ReadStructEnd();
 }