public Read ( |
||
iprot | ||
return | void |
public void Read(TProtocol iprot) { iprot.IncrementRecursionDepth(); try { bool isset_row = false; bool isset_columns = false; 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) { Row = iprot.ReadBinary(); isset_row = true; } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 2: if (field.Type == TType.List) { { Columns = new List <TColumnIncrement>(); TList _list35 = iprot.ReadListBegin(); for (int _i36 = 0; _i36 < _list35.Count; ++_i36) { TColumnIncrement _elem37; _elem37 = new TColumnIncrement(); _elem37.Read(iprot); Columns.Add(_elem37); } iprot.ReadListEnd(); } isset_columns = true; } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 4: if (field.Type == TType.Map) { { Attributes = new Dictionary <byte[], byte[]>(); TMap _map38 = iprot.ReadMapBegin(); for (int _i39 = 0; _i39 < _map38.Count; ++_i39) { byte[] _key40; byte[] _val41; _key40 = iprot.ReadBinary(); _val41 = iprot.ReadBinary(); Attributes[_key40] = _val41; } iprot.ReadMapEnd(); } } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 5: if (field.Type == TType.I32) { Durability = (TDurability)iprot.ReadI32(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 6: if (field.Type == TType.Struct) { CellVisibility = new TCellVisibility(); CellVisibility.Read(iprot); } else { TProtocolUtil.Skip(iprot, field.Type); } break; default: TProtocolUtil.Skip(iprot, field.Type); break; } iprot.ReadFieldEnd(); } iprot.ReadStructEnd(); if (!isset_row) { throw new TProtocolException(TProtocolException.INVALID_DATA, "required field Row not set"); } if (!isset_columns) { throw new TProtocolException(TProtocolException.INVALID_DATA, "required field Columns not set"); } } finally { iprot.DecrementRecursionDepth(); } }
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) { Row = iprot.ReadBinary(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 2: if (field.Type == TType.List) { { Columns = new List<TColumnIncrement>(); TList _list16 = iprot.ReadListBegin(); for( int _i17 = 0; _i17 < _list16.Count; ++_i17) { TColumnIncrement _elem18 = new TColumnIncrement(); _elem18 = new TColumnIncrement(); _elem18.Read(iprot); Columns.Add(_elem18); } iprot.ReadListEnd(); } } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 3: if (field.Type == TType.Bool) { WriteToWal = iprot.ReadBool(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; default: TProtocolUtil.Skip(iprot, field.Type); break; } iprot.ReadFieldEnd(); } iprot.ReadStructEnd(); }
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) { Row = iprot.ReadBinary(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 2: if (field.Type == TType.List) { { Columns = new List <TColumnIncrement>(); TList _list16 = iprot.ReadListBegin(); for (int _i17 = 0; _i17 < _list16.Count; ++_i17) { TColumnIncrement _elem18 = new TColumnIncrement(); _elem18 = new TColumnIncrement(); _elem18.Read(iprot); Columns.Add(_elem18); } iprot.ReadListEnd(); } } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 3: if (field.Type == TType.Bool) { WriteToWal = iprot.ReadBool(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; default: TProtocolUtil.Skip(iprot, field.Type); break; } iprot.ReadFieldEnd(); } iprot.ReadStructEnd(); }