示例#1
0
            /// <inheritdoc />
            public async Task <bool> MoveNextAsync(CancellationToken cancellationToken)
            {
                await _array.ValidateLengthAsync(cancellationToken);

                var stateManager = _array._stateManager;

                if (_index >= _array.Length)
                {
                    return(false);
                }

                var valueResult = await stateManager.TryGetStateAsync <T>(_array.IndexToKey(_index), cancellationToken);

                Current = valueResult.Value;
                _index++;
                return(true);
            }