Merge remote-tracking branch 'origin/netcore/netcore' into netcore/task/models-builder-9789

# Conflicts:
#	src/Umbraco.ModelsBuilder.Embedded/ModelsBuilderNotificationHandler.cs
This commit is contained in:
Shannon
2021-01-19 17:43:18 +11:00
366 changed files with 15062 additions and 12550 deletions

View File

@@ -22,8 +22,10 @@ using Umbraco.Core.Composing;
using Umbraco.Core.Configuration.Models;
using Umbraco.Core.DependencyInjection;
using Umbraco.Core.Diagnostics;
using Umbraco.Core.Events;
using Umbraco.Core.Hosting;
using Umbraco.Core.Logging;
using Umbraco.Core.Migrations.Install;
using Umbraco.Core.Persistence;
using Umbraco.Core.Persistence.SqlSyntax;
using Umbraco.Core.Security;
@@ -124,7 +126,7 @@ namespace Umbraco.Web.Common.DependencyInjection
// Add supported databases
builder.AddUmbracoSqlServerSupport();
builder.AddUmbracoSqlCeSupport();
builder.Services.AddUnique<DatabaseSchemaCreatorFactory>();
// Must be added here because DbProviderFactories is netstandard 2.1 so cannot exist in Infra for now
builder.Services.AddSingleton<IDbProviderFactoryCreator>(factory => new DbProviderFactoryCreator(
@@ -137,7 +139,7 @@ namespace Umbraco.Web.Common.DependencyInjection
builder.AddCoreInitialServices();
// aspnet app lifetime mgmt
builder.Services.AddMultipleUnique<IUmbracoApplicationLifetimeManager, IUmbracoApplicationLifetime, AspNetCoreUmbracoApplicationLifetime>();
builder.Services.AddUnique<IUmbracoApplicationLifetime, AspNetCoreUmbracoApplicationLifetime>();
builder.Services.AddUnique<IApplicationShutdownRegistry, AspNetCoreApplicationShutdownRegistry>();
return builder;
@@ -166,15 +168,18 @@ namespace Umbraco.Web.Common.DependencyInjection
}
/// <summary>
/// Adds mini profiler services for Umbraco
/// Adds the Umbraco request profiler
/// </summary>
public static IUmbracoBuilder AddMiniProfiler(this IUmbracoBuilder builder)
public static IUmbracoBuilder AddUmbracoProfiler(this IUmbracoBuilder builder)
{
builder.Services.AddUnique<WebProfilerHtml>();
builder.Services.AddMiniProfiler(options =>
// WebProfiler determine and start profiling. We should not use the MiniProfilerMiddleware to also profile
options.ShouldProfile = request => false);
builder.AddNotificationHandler<UmbracoApplicationStarting, InitializeWebProfiling>();
return builder;
}