Move UmbracoConfig singleton to Current

This commit is contained in:
Stephan
2018-12-12 17:49:24 +01:00
parent e40c9cb227
commit adced099be
77 changed files with 341 additions and 365 deletions

View File

@@ -4,6 +4,7 @@ using System.Net.Mail;
using System.Threading;
using System.Threading.Tasks;
using Umbraco.Core;
using Umbraco.Core.Composing;
using Umbraco.Core.Configuration;
using Umbraco.Core.Logging;
using Umbraco.Core.Services;
@@ -69,7 +70,7 @@ namespace Umbraco.Web.HealthCheck.NotificationMethods
private MailMessage CreateMailMessage(string subject, string message)
{
var to = UmbracoConfig.For.UmbracoSettings().Content.NotificationEmailAddress;
var to = Current.Config.Umbraco().Content.NotificationEmailAddress;
if (string.IsNullOrWhiteSpace(subject))
subject = "Umbraco Health Check Status";

View File

@@ -2,6 +2,7 @@
using System.Reflection;
using System.Threading;
using System.Threading.Tasks;
using Umbraco.Core.Composing;
using Umbraco.Core.Configuration;
using Umbraco.Core.Configuration.HealthChecks;
@@ -19,7 +20,7 @@ namespace Umbraco.Web.HealthCheck.NotificationMethods
return;
}
var healthCheckConfig = UmbracoConfig.For.HealthCheck();
var healthCheckConfig = Current.Config.HealthChecks();
var notificationMethods = healthCheckConfig.NotificationSettings.NotificationMethods;
var notificationMethod = notificationMethods[attribute.Alias];
if (notificationMethod == null)