Read() публичный Метод

public Read ( TProtocol iprot ) : void
iprot Thrift.Protocol.TProtocol
Результат void
Пример #1
0
 public void Read(TProtocol iprot)
 {
     TField field;
     TStruct struc = 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 _map13 = iprot.ReadMapBegin();
       for( int _i14 = 0; _i14 < _map13.Count; ++_i14)
       {
         byte[] _key15;
         ColumnDescriptor _val16;
         _key15 = iprot.ReadBinary();
         _val16 = new ColumnDescriptor();
         _val16.Read(iprot);
         this.success[_key15] = _val16;
       }
       iprot.ReadMapEnd();
     }
     this.__isset.success = true;
       } else {
     TProtocolUtil.Skip(iprot, field.Type);
       }
       break;
     case 1:
       if (field.Type == TType.Struct) {
     this.io = new IOError();
     this.io.Read(iprot);
     this.__isset.io = true;
       } 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;
     TStruct struc = 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();
     this.__isset.tableName = true;
       } else {
     TProtocolUtil.Skip(iprot, field.Type);
       }
       break;
     case 2:
       if (field.Type == TType.List) {
     {
       this.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);
         this.columnFamilies.Add(_elem24);
       }
       iprot.ReadListEnd();
     }
     this.__isset.columnFamilies = true;
       } else {
     TProtocolUtil.Skip(iprot, field.Type);
       }
       break;
     default:
       TProtocolUtil.Skip(iprot, field.Type);
       break;
       }
       iprot.ReadFieldEnd();
     }
     iprot.ReadStructEnd();
 }