AB3594 - Moved the composition root out to UmbracoApplicationBase, and injecting the needed parts from there. Also remove usages of ConfigurationManager from Umbraco.Core

This commit is contained in:
Bjarke Berg
2019-11-15 11:07:37 +01:00
parent 126380dcee
commit 603ec0ccfb
63 changed files with 441 additions and 339 deletions

View File

@@ -1,4 +1,10 @@
using Umbraco.Web.Editors;
using Umbraco.Core;
using Umbraco.Core.Cache;
using Umbraco.Core.Configuration;
using Umbraco.Core.Logging;
using Umbraco.Core.Persistence;
using Umbraco.Core.Services;
using Umbraco.Web.Editors;
using Umbraco.Web.WebApi.Filters;
namespace Umbraco.Web.Profiling
@@ -9,11 +15,19 @@ namespace Umbraco.Web.Profiling
[UmbracoApplicationAuthorize(Core.Constants.Applications.Settings)]
public class WebProfilingController : UmbracoAuthorizedJsonController
{
private readonly IRuntimeState _runtimeState;
public WebProfilingController(IGlobalSettings globalSettings, IUmbracoContextAccessor umbracoContextAccessor, ISqlContext sqlContext, ServiceContext services, AppCaches appCaches, IProfilingLogger logger, IRuntimeState runtimeState, UmbracoHelper umbracoHelper)
: base(globalSettings, umbracoContextAccessor, sqlContext, services, appCaches, logger, runtimeState, umbracoHelper)
{
_runtimeState = runtimeState;
}
public object GetStatus()
{
return new
{
Enabled = Core.Configuration.GlobalSettings.DebugMode
Enabled = _runtimeState.Debug
};
}
}}