Exemplo n.º 1
0
        public async Task <bool> MoveNextAsync(CancellationToken cancellation)
        {
            var row = _rowPool.Allocate();

            var state = State.start;

            while (state != State.end2)
            {
                if (_currentChunk == null)
                {
                    _currentChunk = await _reader.ReadAsync(cancellation);

                    if (_currentChunk == null)
                    {
                        break;
                    }
                }

                state = Parse(state, row);
            }

            return(CompleteRead(row));
        }