Merge branch temp8 into temp8-di2690

This commit is contained in:
Stephan
2018-11-23 14:58:08 +01:00
614 changed files with 13349 additions and 16438 deletions

View File

@@ -1,10 +1,10 @@
using System.Web;
using Umbraco.Core;
using Umbraco.Core.Cache;
using Umbraco.Core.Composing;
using Umbraco.Core.Configuration;
using Umbraco.Core.Logging;
using Umbraco.Core.Runtime;
using Umbraco.Web.Logging;
namespace Umbraco.Web.Runtime
{
@@ -14,6 +14,7 @@ namespace Umbraco.Web.Runtime
/// <remarks>On top of CoreRuntime, handles all of the web-related runtime aspects of Umbraco.</remarks>
public class WebRuntime : CoreRuntime
{
private readonly UmbracoApplicationBase _umbracoApplication;
private IProfiler _webProfiler;
/// <summary>
@@ -21,8 +22,10 @@ namespace Umbraco.Web.Runtime
/// </summary>
/// <param name="umbracoApplication"></param>
public WebRuntime(UmbracoApplicationBase umbracoApplication)
: base(umbracoApplication)
{ }
: base()
{
_umbracoApplication = umbracoApplication;
}
/// <inheritdoc/>
public override void Boot(IContainer container)
@@ -50,6 +53,10 @@ namespace Umbraco.Web.Runtime
/// <inheritdoc/>
public override void Compose(IContainer container)
{
// some components may want to initialize with the UmbracoApplicationBase
// well, they should not - we should not do this
// TODO remove this eventually.
container.RegisterInstance(_umbracoApplication);
base.Compose(container);
container.Register<UmbracoInjectedModule>();

View File

@@ -29,6 +29,7 @@ using Umbraco.Core.PropertyEditors;
using Umbraco.Core.PropertyEditors.ValueConverters;
using Umbraco.Core.Runtime;
using Umbraco.Core.Services;
using Umbraco.Web.Actions;
using Umbraco.Web.Cache;
using Umbraco.Web.Composing.Composers;
using Umbraco.Web.ContentApps;
@@ -51,7 +52,7 @@ using Umbraco.Web.Tour;
using Umbraco.Web.Trees;
using Umbraco.Web.UI.JavaScript;
using Umbraco.Web.WebApi;
using Umbraco.Web._Legacy.Actions;
using Current = Umbraco.Web.Composing.Current;
namespace Umbraco.Web.Runtime
@@ -135,7 +136,7 @@ namespace Umbraco.Web.Runtime
Current.DefaultRenderMvcControllerType = typeof(RenderMvcController); // fixme WRONG!
composition.Container.RegisterCollectionBuilder<ActionCollectionBuilder>()
.SetProducer(() => typeLoader.GetActions());
.Add(() => typeLoader.GetTypes<IAction>());
var surfaceControllerTypes = new SurfaceControllerTypeCollection(typeLoader.GetSurfaceControllers());
composition.Container.RegisterInstance(surfaceControllerTypes);