public bool MoveNext()
            {
                try
                {
                    _shaper.StartMaterializingElement();

                    if (!_shaper.StoreRead())
                    {
                        // Reset all collections
                        RootCoordinator.ResetCollection(_shaper);
                        return(false);
                    }

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

                return(true);
            }
            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);
            }
示例#3
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);
            }