Example #1
0
        public bool MoveNext()
        {
            if (_reader.EndOfStream || !_currentState.ContinueReadingLine)
            {
                return(false);
            }

            _currentState = INITIAL_STATE;
            _length       = 0;

            while (!_currentState.IsEndState)
            {
                if (_length == _buffer.Length - 1)
                {
                    Array.Resize(ref _buffer, (int)(_length * 1.1));
                }

                _currentState = _currentState.Read(_reader, ref _buffer, ref _length);
            }

            return(true);
        }