Fixed registration of IIndexPopulators, to allow injection as IEnumerable<IIndexPopulator>

This commit is contained in:
Bjarke Berg
2021-02-15 13:54:01 +01:00
parent 9ba04c394b
commit 2fa5c8e3be

View File

@@ -1,6 +1,6 @@
using Microsoft.Extensions.DependencyInjection;
using Umbraco.Core.DependencyInjection;
using Umbraco.Core.Composing;
using Umbraco.Core.DependencyInjection;
using Umbraco.Core.Models;
using Umbraco.Core.PropertyEditors;
using Umbraco.Core.Scoping;
@@ -22,10 +22,10 @@ namespace Umbraco.Web.Search
// populators are not a collection: one cannot remove ours, and can only add more
// the container can inject IEnumerable<IIndexPopulator> and get them all
builder.Services.AddSingleton<MemberIndexPopulator>();
builder.Services.AddSingleton<ContentIndexPopulator>();
builder.Services.AddSingleton<PublishedContentIndexPopulator>();
builder.Services.AddSingleton<MediaIndexPopulator>();
builder.Services.AddSingleton<IIndexPopulator, MemberIndexPopulator>();
builder.Services.AddSingleton<IIndexPopulator, ContentIndexPopulator>();
builder.Services.AddSingleton<IIndexPopulator, PublishedContentIndexPopulator>();
builder.Services.AddSingleton<IIndexPopulator, MediaIndexPopulator>();
builder.Services.AddSingleton<IndexRebuilder>();
builder.Services.AddUnique<IUmbracoIndexConfig, UmbracoIndexConfig>();