reduces code duplication
This commit is contained in:
@@ -17,12 +17,18 @@ namespace Umbraco.Core.Composing
|
||||
_container = new LightInjectContainer(container);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Creates an ASP.NET Core compatible service container
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static ServiceContainer CreateServiceContainer() => new ServiceContainer(ContainerOptions.Default.Clone().WithMicrosoftSettings().WithAspNetCoreSettings());
|
||||
|
||||
/// <summary>
|
||||
/// Default ctor for use in Host Builder configuration
|
||||
/// </summary>
|
||||
public UmbracoServiceProviderFactory()
|
||||
{
|
||||
var container = new ServiceContainer(ContainerOptions.Default.Clone().WithMicrosoftSettings().WithAspNetCoreSettings());
|
||||
var container = CreateServiceContainer();
|
||||
UmbracoContainer = _container = new LightInjectContainer(container);
|
||||
IsActive = true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user