Fix buf in Healthchecksettings
This commit is contained in:
@@ -48,8 +48,13 @@ namespace Umbraco.Configuration.Models
|
||||
.GetChildren()
|
||||
.ToDictionary(x=>x.Key, x=> (INotificationMethod) new NotificationMethod(x.Key, x));
|
||||
|
||||
public IEnumerable<IDisabledHealthCheck> DisabledChecks =>
|
||||
_configurationSection.GetValue<DisabledHealthCheck[]>("DisabledChecks", Array.Empty<DisabledHealthCheck>());
|
||||
public IEnumerable<IDisabledHealthCheck> DisabledChecks => _configurationSection.GetSection("DisabledChecks").GetChildren().Select(
|
||||
x => new DisabledHealthCheck()
|
||||
{
|
||||
Id = x.GetValue<Guid>("Id"),
|
||||
DisabledOn = x.GetValue<DateTime>("DisabledOn"),
|
||||
DisabledBy = x.GetValue<int>("DisabledBy"),
|
||||
});
|
||||
}
|
||||
|
||||
private class NotificationMethod : INotificationMethod
|
||||
|
||||
@@ -7,6 +7,7 @@ using Umbraco.Composing;
|
||||
using Umbraco.Configuration;
|
||||
using Umbraco.Core.Cache;
|
||||
using Umbraco.Core.Configuration;
|
||||
using Umbraco.Core.Configuration.HealthChecks;
|
||||
using Umbraco.Core.IO;
|
||||
using Umbraco.Core.Logging;
|
||||
using Umbraco.Core.Logging.Serilog;
|
||||
@@ -29,7 +30,9 @@ namespace Umbraco.Web.BackOffice.AspNetCore
|
||||
var configsFactory = new AspNetCoreConfigsFactory(configuration);
|
||||
var configs = configsFactory.Create();
|
||||
|
||||
var settings = configs.GetConfig<IModelsBuilderConfig>();
|
||||
var settings = configs.GetConfig<IHealthChecksSettings>();
|
||||
|
||||
|
||||
|
||||
services.CreateCompositionRoot(
|
||||
httpContextAccessor,
|
||||
|
||||
Reference in New Issue
Block a user