NetCore: MSDI refactor phase 2 (#9280)

* Moved adapters from Infra -> Core

* Allow Composition to accept a service collection instead of an IRegister

* Composition no longer takes IRegister as constructor arg

all tests passing

* Composition no longer implements IRegister

* Lose _uniques in Composition

* lose Composition OnCreatingFactory actions

* Clean up UmbracoCoreServiceCollectionExtensions & Composition

Less IFactory

* LightInject gone where TFW == netstandard2.0 || TFW == netcoreapp3.1

* Resolve dead code issues

* Rename IFactory methods to match IServiceProvider so they can be trivially swapped later.

* Rename IFactory methods to match IServiceProvider so they can be trivially swapped later (continued)

Thought the counts were low, it's mostly extension method usage
This commit is contained in:
Paul Johnson
2020-10-27 10:53:01 +00:00
committed by GitHub
parent 507facbdaa
commit ec66990e72
111 changed files with 662 additions and 1998 deletions

View File

@@ -61,7 +61,7 @@ namespace Umbraco.Tests.Cache.PublishedCache
_httpContextFactory = new FakeHttpContextFactory("~/Home");
var globalSettings = new GlobalSettings();
var umbracoContextAccessor = Factory.GetInstance<IUmbracoContextAccessor>();
var umbracoContextAccessor = Factory.GetRequiredService<IUmbracoContextAccessor>();
_xml = new XmlDocument();
_xml.LoadXml(GetXml());
@@ -70,7 +70,7 @@ namespace Umbraco.Tests.Cache.PublishedCache
var domainCache = new DomainCache(Mock.Of<IDomainService>(), DefaultCultureAccessor);
var publishedShapshot = new PublishedSnapshot(
new PublishedContentCache(xmlStore, domainCache, appCache, globalSettings, ContentTypesCache, null, VariationContextAccessor, null),
new PublishedMediaCache(xmlStore, Mock.Of<IMediaService>(), Mock.Of<IUserService>(), appCache, ContentTypesCache, Factory.GetInstance<IEntityXmlSerializer>(), umbracoContextAccessor, VariationContextAccessor),
new PublishedMediaCache(xmlStore, Mock.Of<IMediaService>(), Mock.Of<IUserService>(), appCache, ContentTypesCache, Factory.GetRequiredService<IEntityXmlSerializer>(), umbracoContextAccessor, VariationContextAccessor),
new PublishedMemberCache(null, appCache, Mock.Of<IMemberService>(), ContentTypesCache, Mock.Of<IUserService>(), VariationContextAccessor),
domainCache);
var publishedSnapshotService = new Mock<IPublishedSnapshotService>();