public async Task InvokeAsync(CFTFileContext context) { try { _logger.LogInformation(StartMessage); await ExecAsync(context); _logger.LogInformation(EndSuccessMessage); } catch (Exception e) { _logger.LogError(e, EndErrorMessage); throw; } try { await _next.Invoke(context); } catch (Exception e) { await NextExceptionExecAsync(e, context); throw; } }
protected abstract Task NextExceptionExecAsync(Exception e, CFTFileContext context);
protected abstract Task ExecAsync(CFTFileContext context);