public async Task ReadAsync(TProtocol iprot, CancellationToken cancellationToken) { iprot.IncrementRecursionDepth(); try { bool isset_row = false; TField field; await iprot.ReadStructBeginAsync(cancellationToken); while (true) { field = await iprot.ReadFieldBeginAsync(cancellationToken); if (field.Type == TType.Stop) { break; } switch (field.ID) { case 1: if (field.Type == TType.String) { Row = await iprot.ReadBinaryAsync(cancellationToken); isset_row = true; } else { await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); } break; case 2: if (field.Type == TType.List) { { Columns = new List <TColumn>(); TList _list8 = await iprot.ReadListBeginAsync(cancellationToken); for (int _i9 = 0; _i9 < _list8.Count; ++_i9) { TColumn _elem10; _elem10 = new TColumn(); await _elem10.ReadAsync(iprot, cancellationToken); Columns.Add(_elem10); } await iprot.ReadListEndAsync(cancellationToken); } } else { await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); } break; case 3: if (field.Type == TType.I64) { Timestamp = await iprot.ReadI64Async(cancellationToken); } else { await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); } break; case 4: if (field.Type == TType.Struct) { TimeRange = new TTimeRange(); await TimeRange.ReadAsync(iprot, cancellationToken); } else { await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); } break; case 5: if (field.Type == TType.I32) { MaxVersions = await iprot.ReadI32Async(cancellationToken); } else { await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); } break; case 6: if (field.Type == TType.String) { FilterString = await iprot.ReadBinaryAsync(cancellationToken); } else { await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); } break; case 7: if (field.Type == TType.Map) { { Attributes = new Dictionary <byte[], byte[]>(); TMap _map11 = await iprot.ReadMapBeginAsync(cancellationToken); for (int _i12 = 0; _i12 < _map11.Count; ++_i12) { byte[] _key13; byte[] _val14; _key13 = await iprot.ReadBinaryAsync(cancellationToken); _val14 = await iprot.ReadBinaryAsync(cancellationToken); Attributes[_key13] = _val14; } await iprot.ReadMapEndAsync(cancellationToken); } } else { await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); } break; case 8: if (field.Type == TType.Struct) { Authorizations = new TAuthorization(); await Authorizations.ReadAsync(iprot, cancellationToken); } else { await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); } break; default: await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); break; } await iprot.ReadFieldEndAsync(cancellationToken); } await iprot.ReadStructEndAsync(cancellationToken); if (!isset_row) { throw new TProtocolException(TProtocolException.INVALID_DATA); } } finally { iprot.DecrementRecursionDepth(); } }
public async Task ReadAsync(TProtocol iprot, CancellationToken cancellationToken) { iprot.IncrementRecursionDepth(); try { TField field; await iprot.ReadStructBeginAsync(cancellationToken); while (true) { field = await iprot.ReadFieldBeginAsync(cancellationToken); if (field.Type == TType.Stop) { break; } switch (field.ID) { case 1: if (field.Type == TType.String) { StartRow = await iprot.ReadBinaryAsync(cancellationToken); } else { await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); } break; case 2: if (field.Type == TType.String) { StopRow = await iprot.ReadBinaryAsync(cancellationToken); } else { await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); } break; case 3: if (field.Type == TType.List) { { Columns = new List <TColumn>(); TList _list53 = await iprot.ReadListBeginAsync(cancellationToken); for (int _i54 = 0; _i54 < _list53.Count; ++_i54) { TColumn _elem55; _elem55 = new TColumn(); await _elem55.ReadAsync(iprot, cancellationToken); Columns.Add(_elem55); } await iprot.ReadListEndAsync(cancellationToken); } } else { await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); } break; case 4: if (field.Type == TType.I32) { Caching = await iprot.ReadI32Async(cancellationToken); } else { await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); } break; case 5: if (field.Type == TType.I32) { MaxVersions = await iprot.ReadI32Async(cancellationToken); } else { await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); } break; case 6: if (field.Type == TType.Struct) { TimeRange = new TTimeRange(); await TimeRange.ReadAsync(iprot, cancellationToken); } else { await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); } break; case 7: if (field.Type == TType.String) { FilterString = await iprot.ReadBinaryAsync(cancellationToken); } else { await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); } break; case 8: if (field.Type == TType.I32) { BatchSize = await iprot.ReadI32Async(cancellationToken); } else { await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); } break; case 9: if (field.Type == TType.Map) { { Attributes = new Dictionary <byte[], byte[]>(); TMap _map56 = await iprot.ReadMapBeginAsync(cancellationToken); for (int _i57 = 0; _i57 < _map56.Count; ++_i57) { byte[] _key58; byte[] _val59; _key58 = await iprot.ReadBinaryAsync(cancellationToken); _val59 = await iprot.ReadBinaryAsync(cancellationToken); Attributes[_key58] = _val59; } await iprot.ReadMapEndAsync(cancellationToken); } } else { await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); } break; case 10: if (field.Type == TType.Struct) { Authorizations = new TAuthorization(); await Authorizations.ReadAsync(iprot, cancellationToken); } else { await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); } break; case 11: if (field.Type == TType.Bool) { Reversed = await iprot.ReadBoolAsync(cancellationToken); } else { await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); } break; default: await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); break; } await iprot.ReadFieldEndAsync(cancellationToken); } await iprot.ReadStructEndAsync(cancellationToken); } 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) { StartRow = iprot.ReadBinary(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 2: if (field.Type == TType.String) { StopRow = iprot.ReadBinary(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 3: if (field.Type == TType.List) { { Columns = new List <TColumn>(); TList _list53 = iprot.ReadListBegin(); for (int _i54 = 0; _i54 < _list53.Count; ++_i54) { TColumn _elem55 = new TColumn(); _elem55 = new TColumn(); _elem55.Read(iprot); Columns.Add(_elem55); } iprot.ReadListEnd(); } } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 4: if (field.Type == TType.I32) { Caching = iprot.ReadI32(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 5: if (field.Type == TType.I32) { MaxVersions = iprot.ReadI32(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 6: if (field.Type == TType.Struct) { TimeRange = new TTimeRange(); TimeRange.Read(iprot); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 7: if (field.Type == TType.String) { FilterString = iprot.ReadBinary(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 8: if (field.Type == TType.I32) { BatchSize = iprot.ReadI32(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 9: if (field.Type == TType.Map) { { Attributes = new Dictionary <byte[], byte[]>(); TMap _map56 = iprot.ReadMapBegin(); for (int _i57 = 0; _i57 < _map56.Count; ++_i57) { byte[] _key58; byte[] _val59; _key58 = iprot.ReadBinary(); _val59 = iprot.ReadBinary(); Attributes[_key58] = _val59; } iprot.ReadMapEnd(); } } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 10: if (field.Type == TType.Struct) { Authorizations = new TAuthorization(); Authorizations.Read(iprot); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 11: if (field.Type == TType.Bool) { Reversed = 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 <TColumn>(); TList _list8 = iprot.ReadListBegin(); for (int _i9 = 0; _i9 < _list8.Count; ++_i9) { TColumn _elem10 = new TColumn(); _elem10 = new TColumn(); _elem10.Read(iprot); Columns.Add(_elem10); } iprot.ReadListEnd(); } } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 3: if (field.Type == TType.I64) { Timestamp = iprot.ReadI64(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 4: if (field.Type == TType.Struct) { TimeRange = new TTimeRange(); TimeRange.Read(iprot); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 5: if (field.Type == TType.I32) { MaxVersions = iprot.ReadI32(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 6: if (field.Type == TType.String) { FilterString = iprot.ReadBinary(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 7: if (field.Type == TType.Map) { { Attributes = new Dictionary <byte[], byte[]>(); TMap _map11 = iprot.ReadMapBegin(); for (int _i12 = 0; _i12 < _map11.Count; ++_i12) { byte[] _key13; byte[] _val14; _key13 = iprot.ReadBinary(); _val14 = iprot.ReadBinary(); Attributes[_key13] = _val14; } iprot.ReadMapEnd(); } } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 8: if (field.Type == TType.Struct) { Authorizations = new TAuthorization(); Authorizations.Read(iprot); } else { TProtocolUtil.Skip(iprot, field.Type); } break; default: TProtocolUtil.Skip(iprot, field.Type); break; } iprot.ReadFieldEnd(); } iprot.ReadStructEnd(); }