Merge remote-tracking branch 'origin/netcore/dev' into netcore/feature/AB5822-smidge-implementation

# Conflicts:
#	src/Umbraco.Web.Common/Extensions/UmbracoCoreServiceCollectionExtensions.cs
#	src/Umbraco.Web.UI.NetCore/Startup.cs
#	src/Umbraco.Web.UI/Umbraco/PartialViewMacros/Templates/Gallery.cshtml
This commit is contained in:
Bjarke Berg
2020-04-01 15:52:23 +02:00
103 changed files with 2032 additions and 1301 deletions

View File

@@ -52,13 +52,25 @@ namespace Umbraco.Web.Common.Extensions
/// <param name="webHostEnvironment"></param>
/// <returns></returns>
public static IServiceCollection AddUmbracoCore(this IServiceCollection services, IWebHostEnvironment webHostEnvironment)
{
return services.AddUmbracoCore(webHostEnvironment,out _);
}
/// <summary>
/// Adds the Umbraco Back Core requirements
/// </summary>
/// <param name="services"></param>
/// <param name="webHostEnvironment"></param>
/// <param name="factory"></param>
/// <returns></returns>
public static IServiceCollection AddUmbracoCore(this IServiceCollection services, IWebHostEnvironment webHostEnvironment, out IFactory factory)
{
if (!UmbracoServiceProviderFactory.IsActive)
throw new InvalidOperationException("Ensure to add UseUmbraco() in your Program.cs after ConfigureWebHostDefaults to enable Umbraco's service provider factory");
var umbContainer = UmbracoServiceProviderFactory.UmbracoContainer;
services.AddUmbracoCore(webHostEnvironment, umbContainer, Assembly.GetEntryAssembly());
services.AddUmbracoCore(webHostEnvironment, umbContainer, Assembly.GetEntryAssembly(), out factory);
return services;
}
@@ -70,8 +82,9 @@ namespace Umbraco.Web.Common.Extensions
/// <param name="webHostEnvironment"></param>
/// <param name="umbContainer"></param>
/// <param name="entryAssembly"></param>
/// <param name="factory"></param>
/// <returns></returns>
public static IServiceCollection AddUmbracoCore(this IServiceCollection services, IWebHostEnvironment webHostEnvironment, IRegister umbContainer, Assembly entryAssembly)
public static IServiceCollection AddUmbracoCore(this IServiceCollection services, IWebHostEnvironment webHostEnvironment, IRegister umbContainer, Assembly entryAssembly, out IFactory factory)
{
if (services is null) throw new ArgumentNullException(nameof(services));
var container = umbContainer;
@@ -101,7 +114,7 @@ namespace Umbraco.Web.Common.Extensions
backOfficeInfo,
typeFinder);
var factory = coreRuntime.Configure(container);
factory = coreRuntime.Configure(container);
return services;
}
@@ -159,8 +172,6 @@ namespace Umbraco.Web.Common.Extensions
backOfficeInfo = new AspNetCoreBackOfficeInfo(globalSettings);
profiler = GetWebProfiler(hostingEnvironment, httpContextAccessor);
Current.Initialize(logger, configs, ioHelper, hostingEnvironment, backOfficeInfo, profiler);
return services;
}