private OHMRow convertRowResult(TRowResult result) { if(result == null) return null; //Create the columns Dictionary<byte[], OHMCell> columns = new Dictionary<byte[], OHMCell>(result.columns.Count); foreach(KeyValuePair<byte[], TCell> column in result.columns) { columns.Add(column.Key, new OHMCell(column.Value.value, column.Value.timestamp)); } //Create and return the row return new OHMRow(result.row, columns); }
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.Struct) { this.success = new TRowResult(); this.success.Read(iprot); 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; case 2: if (field.Type == TType.Struct) { this.ia = new IllegalArgument(); this.ia.Read(iprot); this.__isset.ia = true; } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 3: if (field.Type == TType.Struct) { this.nf = new NotFound(); this.nf.Read(iprot); this.__isset.nf = true; } else { TProtocolUtil.Skip(iprot, field.Type); } break; default: TProtocolUtil.Skip(iprot, field.Type); break; } iprot.ReadFieldEnd(); } iprot.ReadStructEnd(); }