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

@@ -2,6 +2,7 @@
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.Sync;
@@ -54,7 +55,7 @@ namespace Umbraco.Web.Scheduling
using (_proflog.DebugDuration<KeepAlive>("Health checks executing", "Health checks complete"))
{
var healthCheckConfig = UmbracoConfig.For.HealthCheck();
var healthCheckConfig = Current.Config.HealthChecks();
// Don't notify for any checks that are disabled, nor for any disabled
// just for notifications

View File

@@ -3,6 +3,7 @@ using System.Collections.Generic;
using System.Threading;
using Umbraco.Core;
using Umbraco.Core.Components;
using Umbraco.Core.Composing;
using Umbraco.Core.Configuration;
using Umbraco.Core.Configuration.HealthChecks;
using Umbraco.Core.Configuration.UmbracoSettings;
@@ -86,7 +87,7 @@ namespace Umbraco.Web.Scheduling
LazyInitializer.EnsureInitialized(ref _tasks, ref _started, ref _locker, () =>
{
_logger.Debug<SchedulerComponent>("Initializing the scheduler");
var settings = UmbracoConfig.For.UmbracoSettings();
var settings = Current.Config.Umbraco();
var tasks = new List<IBackgroundTask>();
@@ -95,7 +96,7 @@ namespace Umbraco.Web.Scheduling
tasks.Add(RegisterTaskRunner(settings));
tasks.Add(RegisterLogScrubber(settings));
var healthCheckConfig = UmbracoConfig.For.HealthCheck();
var healthCheckConfig = Current.Config.HealthChecks();
if (healthCheckConfig.NotificationSettings.Enabled)
tasks.Add(RegisterHealthCheckNotifier(healthCheckConfig, _healthChecks, _notifications, _logger, _proflog));