Amended injection of further settings to use IOptionsSnapshot.

This commit is contained in:
Andy Butland
2020-08-21 14:52:47 +01:00
parent e3a44c6717
commit 510bd92e78
157 changed files with 774 additions and 550 deletions

View File

@@ -17,13 +17,13 @@ namespace Umbraco.Web.HealthCheck.NotificationMethods
private readonly ILocalizedTextService _textService;
private readonly IRequestAccessor _requestAccessor;
private readonly IGlobalSettings _globalSettings;
private readonly GlobalSettings _globalSettings;
private readonly ContentSettings _contentSettings;
public EmailNotificationMethod(
ILocalizedTextService textService,
IRequestAccessor requestAccessor,
IGlobalSettings globalSettings,
IOptionsSnapshot<GlobalSettings> globalSettings,
IHealthChecksSettings healthChecksSettings,
IOptionsSnapshot<ContentSettings> contentSettings)
: base(healthChecksSettings)
@@ -39,7 +39,7 @@ namespace Umbraco.Web.HealthCheck.NotificationMethods
_textService = textService ?? throw new ArgumentNullException(nameof(textService));
_requestAccessor = requestAccessor;
_globalSettings = globalSettings;
_globalSettings = globalSettings.Value;
_contentSettings = contentSettings.Value ?? throw new ArgumentNullException(nameof(contentSettings));
}