Exemplo n.º 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>(new Lib.Comm.ByteArrayComparer());
                         TMap _map13 = iprot.ReadMapBegin();
                         for (int _i14 = 0; _i14 < _map13.Count; ++_i14)
                         {
                             byte[] _key15;
                             ColumnDescriptor _val16;
                             _key15 = iprot.ReadBinary();
                             _val16 = new ColumnDescriptor();
                             _val16.Read(iprot);
                             Success[_key15] = _val16;
                         }
                         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();
 }
Exemplo n.º 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 _list22 = iprot.ReadListBegin();
                         for (int _i23 = 0; _i23 < _list22.Count; ++_i23)
                         {
                             ColumnDescriptor _elem24 = new ColumnDescriptor();
                             _elem24 = new ColumnDescriptor();
                             _elem24.Read(iprot);
                             ColumnFamilies.Add(_elem24);
                         }
                         iprot.ReadListEnd();
                     }
                 }
                 else
                 {
                     TProtocolUtil.Skip(iprot, field.Type);
                 }
                 break;
             default:
                 TProtocolUtil.Skip(iprot, field.Type);
                 break;
         }
         iprot.ReadFieldEnd();
     }
     iprot.ReadStructEnd();
 }