public async Task <bool> MoveNextAsync(CancellationToken cancellationToken)
            {
                if (!_shaper._isActive)
                {
                    return(false);
                }

                cancellationToken.ThrowIfCancellationRequested();

                if (await _shaper.StoreReadAsync(cancellationToken).ConfigureAwait(continueOnCapturedContext: false))
                {
                    try
                    {
                        _shaper.StartMaterializingElement();
                        _shaper.RootCoordinator.ReadNextElement(_shaper);
                    }
                    finally
                    {
                        _shaper.StopMaterializingElement();
                    }
                    return(true);
                }
                Dispose();
                return(false);
            }
            public async Task <bool> MoveNextAsync(CancellationToken cancellationToken)
            {
                if (!_shaper._isActive)
                {
                    return(false);
                }

                cancellationToken.ThrowIfCancellationRequested();

                if (await _shaper.StoreReadAsync(cancellationToken).WithCurrentCulture())
                {
                    try
                    {
                        _shaper.StartMaterializingElement();
                        _shaper.RootCoordinator.ReadNextElement(_shaper);
                    }
                    finally
                    {
                        _shaper.StopMaterializingElement();
                    }

                    // Z.EntityFramework.Classic: QueryResultFilter
                    if (_shaper.RootCoordinator.CurrentWrapper is FilterRemovedEntityWrapper)
                    {
                        return(await MoveNextAsync(cancellationToken));
                    }

                    return(true);
                }
                Dispose();
                return(false);
            }
            public async Task <bool> MoveNextAsync(CancellationToken cancellationToken)
            {
                try
                {
                    _shaper.StartMaterializingElement();

                    if (!await _shaper.StoreReadAsync(cancellationToken).ConfigureAwait(continueOnCapturedContext: false))
                    {
                        // Reset all collections
                        RootCoordinator.ResetCollection(_shaper);
                        return(false);
                    }

                    MaterializeRow();
                }
                finally
                {
                    _shaper.StopMaterializingElement();
                }

                return(true);
            }
Beispiel #4
0
            public async Task <bool> MoveNextAsync(CancellationToken cancellationToken)
            {
                try
                {
                    _shaper.StartMaterializingElement();

                    if (!await _shaper.StoreReadAsync(cancellationToken).WithCurrentCulture())
                    {
                        // Reset all collections
                        RootCoordinator.ResetCollection(_shaper);
                        return(false);
                    }

                    MaterializeRow();
                }
                finally
                {
                    _shaper.StopMaterializingElement();
                }

                return(true);
            }