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

@@ -6,10 +6,15 @@ using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using Umbraco.Composing;
using Umbraco.Core;
using Umbraco.Core.Configuration;
using Umbraco.Core.IO;
using Umbraco.Core.Logging;
using Umbraco.Web.BackOffice.AspNetCore;
using Umbraco.Web.Common.AspNetCore;
using Umbraco.Web.Common.Extensions;
using Umbraco.Web.Website.AspNetCore;
using IHostingEnvironment = Umbraco.Core.Hosting.IHostingEnvironment;
namespace Umbraco.Web.UI.BackOffice
@@ -39,7 +44,7 @@ namespace Umbraco.Web.UI.BackOffice
{
services.AddUmbracoConfiguration(_config);
services.AddUmbracoRuntimeMinifier(_config);
services.AddUmbracoCore(_webHostEnvironment);
services.AddUmbracoCore(_webHostEnvironment, out var factory);
services.AddUmbracoWebsite();
services.AddMvc();
@@ -47,6 +52,17 @@ namespace Umbraco.Web.UI.BackOffice
{
options.ShouldProfile = request => false; // WebProfiler determine and start profiling. We should not use the MiniProfilerMiddleware to also profile
});
//Finally initialize Current
Current.Initialize(
factory.GetInstance<ILogger> (),
factory.GetInstance<Configs>(),
factory.GetInstance<IIOHelper>(),
factory.GetInstance<IHostingEnvironment>(),
factory.GetInstance<IBackOfficeInfo>(),
factory.GetInstance<IProfiler>()
);
}
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.