/// <summary> /// Creates an instance of <see cref="ExceptionManager"/> /// </summary> /// <param name="exceptionDataProvider">Provides <see cref="ExceptionSettings"/> for exception hnandling.</param> /// <param name="errorDetailLocalizer">The <see cref="IErrorDetailLocalizer"/> to use the localized exception messages.</param> /// <param name="exceptionLogger">The <see cref="IExceptionLogger"/> used to log the exception before handling or raising.</param> public ExceptionRaiser(IExceptionDataProvider exceptionDataProvider, IErrorDetailLocalizer errorDetailLocalizer, IExceptionLogger exceptionLogger) { _exceptionDataProvider = exceptionDataProvider; _errorDetailLocalizer = errorDetailLocalizer; _exceptionLogger = exceptionLogger; }
/// <summary> /// Creates an instance of <see cref="ExceptionManager"/> /// </summary> /// <param name="exceptionDataProvider">Provides <see cref="ExceptionSettings"/> for exception hnandling.</param> /// <param name="actionResultCreator">The <see cref="IActionResultCreator"/> to create <see cref="IActionResult"/></param> /// <param name="errorDetailLocalizer">The <see cref="IErrorDetailLocalizer"/> to use the localized exception messages.</param> /// <param name="exceptionLogger">The <see cref="IExceptionLogger"/> used to log the exception before handling or raising.</param> public ExceptionManager(IExceptionDataProvider exceptionDataProvider, IActionResultCreator actionResultCreator, IErrorDetailLocalizer errorDetailLocalizer, IExceptionLogger exceptionLogger) { _exceptionDataProvider = exceptionDataProvider; _actionResultCreator = actionResultCreator; _errorDetailLocalizer = errorDetailLocalizer; _exceptionLogger = exceptionLogger; }
/// <summary> /// Creates an instance of <see cref="ExceptionLogger"/> /// </summary> /// <param name="exceptionDataProvider"><see cref="IExceptionDataProvider"/></param> /// <param name="exceptionLogger"><see cref="ILogger"/> used to log the exceptions</param> public ExceptionLogger(IExceptionDataProvider exceptionDataProvider, ILogger <ExceptionLogger> exceptionLogger) { _exceptionDataProvider = exceptionDataProvider; _exceptionLogger = exceptionLogger; }
/// <summary> /// Creates an instance of <see cref="ErrorDetailLocalizer{TSharedResourceType}"/> /// </summary> /// <param name="exceptionDataProvider">Provides <see cref="ExceptionSettings"/> for exception hnandling.</param> /// <param name="errorDetailLocalizer">The <see cref="IStringLocalizer{TSharedResourceType}"/> to use the localized exception messages.</param> public ErrorDetailLocalizer(IExceptionDataProvider exceptionDataProvider , IStringLocalizer <TSharedResourceType> errorDetailLocalizer) { _exceptionDataProvider = exceptionDataProvider; _errorDetailLocalizer = errorDetailLocalizer; }