Migrated CacheRefresher events to IEventAggregator pattern.

This commit is contained in:
Bjarke Berg
2021-03-12 21:48:24 +01:00
parent 57386c8fbc
commit 06a202e30e
32 changed files with 390 additions and 297 deletions

View File

@@ -3,6 +3,7 @@ using Microsoft.AspNetCore.Mvc.Razor;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.DependencyInjection.Extensions;
using Microsoft.Extensions.Options;
using Umbraco.Cms.Core.Cache;
using Umbraco.Cms.Core.Configuration;
using Umbraco.Cms.Core.Configuration.Models;
using Umbraco.Cms.Core.DependencyInjection;
@@ -102,10 +103,15 @@ namespace Umbraco.Extensions
builder.AddNotificationHandler<ModelBindingError, ModelsBuilderNotificationHandler>();
builder.AddNotificationHandler<UmbracoApplicationStarting, LiveModelsProvider>();
builder.AddNotificationHandler<UmbracoRequestEnd, LiveModelsProvider>();
builder.AddNotificationHandler<UmbracoApplicationStarting, OutOfDateModelsStatus>();
builder.AddNotificationHandler<ContentTypeCacheRefresherNotification, LiveModelsProvider>();
builder.AddNotificationHandler<DataTypeCacheRefresherNotification, LiveModelsProvider>();
builder.Services.AddSingleton<ModelsGenerator>();
builder.Services.AddSingleton<LiveModelsProvider>();
builder.Services.AddSingleton<OutOfDateModelsStatus>();
builder.AddNotificationHandler<ContentTypeCacheRefresherNotification, OutOfDateModelsStatus>();
builder.AddNotificationHandler<DataTypeCacheRefresherNotification, OutOfDateModelsStatus>();
builder.Services.AddSingleton<OutOfDateModelsStatus>();
builder.Services.AddSingleton<ModelsGenerationError>();
builder.Services.AddSingleton<PureLiveModelFactory>();