public async ValueTask OnBatchRunCompleteAsync(BatchContext context, string?errorMessageIfFailed, Exception?exceptionIfExists) { var exceptions = new AggregateExceptionHolder(); foreach (var item in interceptors) { try { await item.OnBatchRunCompleteAsync(context, errorMessageIfFailed, exceptionIfExists); } catch (Exception e) { exceptions.Add(e); } } exceptions.ThrowIfExists(); }
public async ValueTask OnBatchEngineEndAsync() { var exceptions = new AggregateExceptionHolder(); foreach (var item in interceptors) { try { await item.OnBatchEngineEndAsync(); } catch (Exception e) { exceptions.Add(e); } } exceptions.ThrowIfExists(); }
public async ValueTask OnBatchRunBeginAsync(BatchContext context) { var exceptions = new AggregateExceptionHolder(); foreach (var item in interceptors) { try { await item.OnBatchRunBeginAsync(context); } catch (Exception e) { exceptions.Add(e); } } exceptions.ThrowIfExists(); }
public async ValueTask OnBatchEngineBeginAsync(IServiceProvider serviceProvider, ILogger <BatchEngine> logger) { var exceptions = new AggregateExceptionHolder(); foreach (var item in interceptors) { try { await item.OnBatchEngineBeginAsync(serviceProvider, logger); } catch (Exception e) { exceptions.Add(e); } } exceptions.ThrowIfExists(); }