Fix Deserialization of defaultConfig from package.manifest

This commit is contained in:
Bjarke Berg
2021-03-10 21:13:13 +01:00
parent 88e92a0360
commit 78d8f0bacf
5 changed files with 236 additions and 1 deletions

View File

@@ -0,0 +1,25 @@
using System;
using System.ComponentModel;
namespace Umbraco.Cms.Web.Common.DependencyInjection
{
/// <summary>
/// INTERNAL Service locator. Should only be used if no other ways exist.
/// </summary>
/// <remarks>
/// It is created with only two goals in mind
/// 1) Continue to have the same extension methods on IPublishedContent and IPublishedElement as in V8. To make migration easier.
/// 2) To have a tool to avoid breaking changes in minor versions. All methods using this should in theory be obsolete.
///
/// Keep in mind, everything this is used, the code becomes basically untestable.
/// </remarks>
[EditorBrowsable(EditorBrowsableState.Never)]
internal static class StaticServiceProvider
{
/// <summary>
/// The service locator.
/// </summary>
[EditorBrowsable(EditorBrowsableState.Never)]
internal static IServiceProvider Instance { get; set; }
}
}

View File

@@ -19,6 +19,7 @@ namespace Umbraco.Cms.Web.Common.DependencyInjection
public Action<IApplicationBuilder> Configure(Action<IApplicationBuilder> next) =>
app =>
{
StaticServiceProvider.Instance = app.ApplicationServices;
_options.Value.PreUmbracoPipeline(app);
app.UseUmbraco();