public bool MoveNext() { try { if (_inner == null) { _inner = _exceptionInterceptor._innerFactory().GetEnumerator(); } return(_inner.MoveNext()); } catch (Exception e) { _exceptionInterceptor._queryContext.Logger.LogError( new DatabaseErrorLogState(_exceptionInterceptor._queryContext.ContextType), e, (state, exception) => Strings.LogExceptionDuringQueryIteration(Environment.NewLine, exception)); throw; } }
public async Task <bool> MoveNext(CancellationToken cancellationToken) { try { if (_inner == null) { _inner = _exceptionInterceptor._innerFactory().GetEnumerator(); } return(await _inner.MoveNext(cancellationToken).WithCurrentCulture()); } catch (Exception e) { _exceptionInterceptor._queryContext.Logger.LogError( new DataStoreErrorLogState(_exceptionInterceptor._queryContext.ContextType), e, (state, exception) => Strings.LogExceptionDuringQueryIteration(Environment.NewLine, exception)); throw; } }