public async Task <bool> MoveNext(CancellationToken cancellationToken) { if (_relatedValuesEnumerable._iterator._moveNextPending) { _relatedValuesEnumerable._iterator._hasRemainingRows = await _relatedValuesEnumerable._iterator._relatedValuesEnumerator .MoveNext(cancellationToken); _relatedValuesEnumerable._iterator._moveNextPending = false; } if (_relatedValuesEnumerable._iterator._hasRemainingRows && _relatedValuesEnumerable._relatedKeyFactory( _relatedValuesEnumerable._iterator._relatedValuesEnumerator.Current) .Equals(_relatedValuesEnumerable._primaryKey)) { Current = _relatedValuesEnumerable._iterator._relatedValuesEnumerator.Current; _relatedValuesEnumerable._iterator._moveNextPending = true; return(true); } return(false); }
public async Task <bool> MoveNext(CancellationToken cancellationToken) { if (!_relatedValuesEnumerable._iterator._initialized) { _relatedValuesEnumerable._iterator._hasRemainingRows = await _relatedValuesEnumerable._iterator._relatedValuesEnumerator .MoveNext(cancellationToken) .WithCurrentCulture(); _relatedValuesEnumerable._iterator._initialized = true; } if (_relatedValuesEnumerable._iterator._hasRemainingRows && _relatedValuesEnumerable._relatedKeyFactory( _relatedValuesEnumerable._iterator._relatedValuesEnumerator.Current) .Equals(_relatedValuesEnumerable._primaryKey)) { _current = _relatedValuesEnumerable._iterator._relatedValuesEnumerator.Current; _relatedValuesEnumerable._iterator._hasRemainingRows = await _relatedValuesEnumerable._iterator._relatedValuesEnumerator .MoveNext(cancellationToken) .WithCurrentCulture(); return(true); } return(false); }