Пример #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.Map)
                 {
                     {
                         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);
                             Success[_key19] = _val20;
                         }
                         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();
 }
Пример #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 1:
                 if (field.Type == TType.String)
                 {
                     TableName = iprot.ReadBinary();
                 }
                 else
                 {
                     TProtocolUtil.Skip(iprot, field.Type);
                 }
                 break;
             case 2:
                 if (field.Type == TType.List)
                 {
                     {
                         ColumnFamilies = new List<ColumnDescriptor>();
                         TList _list26 = iprot.ReadListBegin();
                         for (int _i27 = 0; _i27 < _list26.Count; ++_i27)
                         {
                             ColumnDescriptor _elem28 = new ColumnDescriptor();
                             _elem28 = new ColumnDescriptor();
                             _elem28.Read(iprot);
                             ColumnFamilies.Add(_elem28);
                         }
                         iprot.ReadListEnd();
                     }
                 }
                 else
                 {
                     TProtocolUtil.Skip(iprot, field.Type);
                 }
                 break;
             default:
                 TProtocolUtil.Skip(iprot, field.Type);
                 break;
         }
         iprot.ReadFieldEnd();
     }
     iprot.ReadStructEnd();
 }