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) { ColumnName = await iprot.ReadBinaryAsync(cancellationToken); } else { await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); } break; case 2: if (field.Type == TType.Struct) { Cell = new TCell(); await Cell.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); } 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) { Row = await iprot.ReadBinaryAsync(cancellationToken); } else { await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); } break; case 2: if (field.Type == TType.Map) { { Columns = new Dictionary <byte[], TCell>(); TMap _map4 = await iprot.ReadMapBeginAsync(cancellationToken); for (int _i5 = 0; _i5 < _map4.Count; ++_i5) { byte[] _key6; TCell _val7; _key6 = await iprot.ReadBinaryAsync(cancellationToken); _val7 = new TCell(); await _val7.ReadAsync(iprot, cancellationToken); Columns[_key6] = _val7; } await iprot.ReadMapEndAsync(cancellationToken); } } else { await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); } break; case 3: if (field.Type == TType.List) { { SortedColumns = 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); SortedColumns.Add(_elem10); } await iprot.ReadListEndAsync(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(); } }