From fa3f52c6d336bad86f1e0f7772fdda6a3a6a7e7a Mon Sep 17 00:00:00 2001 From: Bjarke Berg Date: Thu, 7 May 2020 10:00:18 +0200 Subject: [PATCH] AB#6233 - Clean up --- .../Attributes/PluginControllerAttribute.cs | 2 +- .../Controllers/UmbracoApiController.cs | 15 +--- .../Controllers/UmbracoApiControllerBase.cs | 80 ------------------- 3 files changed, 2 insertions(+), 95 deletions(-) diff --git a/src/Umbraco.Web.Common/Attributes/PluginControllerAttribute.cs b/src/Umbraco.Web.Common/Attributes/PluginControllerAttribute.cs index 83a2611531..8ebc12cc1f 100644 --- a/src/Umbraco.Web.Common/Attributes/PluginControllerAttribute.cs +++ b/src/Umbraco.Web.Common/Attributes/PluginControllerAttribute.cs @@ -4,7 +4,7 @@ using System.Linq; namespace Umbraco.Web.Common.Attributes { /// - /// Indicates that a controller is a plugin tree controller and should be routed to its own area. + /// Indicates that a controller is a plugin controller and should be routed to its own area. /// [AttributeUsage(AttributeTargets.Class, AllowMultiple = false)] public class PluginControllerAttribute : Attribute diff --git a/src/Umbraco.Web.Common/Controllers/UmbracoApiController.cs b/src/Umbraco.Web.Common/Controllers/UmbracoApiController.cs index 0fcbee1c5f..c53b08d3df 100644 --- a/src/Umbraco.Web.Common/Controllers/UmbracoApiController.cs +++ b/src/Umbraco.Web.Common/Controllers/UmbracoApiController.cs @@ -1,12 +1,4 @@ -using Umbraco.Core; -using Umbraco.Core.Cache; -using Umbraco.Core.Composing; -using Umbraco.Core.Configuration; -using Umbraco.Core.Logging; -using Umbraco.Core.Mapping; -using Umbraco.Core.Persistence; -using Umbraco.Core.Services; -using Umbraco.Web.Routing; +using Umbraco.Core.Composing; namespace Umbraco.Web.Common.Controllers { @@ -18,10 +10,5 @@ namespace Umbraco.Web.Common.Controllers protected UmbracoApiController() { } - - // protected UmbracoApiController(IGlobalSettings globalSettings, IUmbracoContextAccessor umbracoContextAccessor, ISqlContext sqlContext, ServiceContext services, AppCaches appCaches, IProfilingLogger logger, IRuntimeState runtimeState, UmbracoMapper umbracoMapper, IPublishedUrlProvider publishedUrlProvider) - // : base(globalSettings, umbracoContextAccessor, sqlContext, services, appCaches, logger, runtimeState, umbracoMapper, publishedUrlProvider) - // { - // } } } diff --git a/src/Umbraco.Web.Common/Controllers/UmbracoApiControllerBase.cs b/src/Umbraco.Web.Common/Controllers/UmbracoApiControllerBase.cs index 794a5c0966..4a0bff7ffb 100644 --- a/src/Umbraco.Web.Common/Controllers/UmbracoApiControllerBase.cs +++ b/src/Umbraco.Web.Common/Controllers/UmbracoApiControllerBase.cs @@ -22,85 +22,5 @@ namespace Umbraco.Web.Common.Controllers public abstract class UmbracoApiControllerBase : Controller, IUmbracoFeature { - // - // /// - // /// Initializes a new instance of the class with all its dependencies. - // /// - // protected UmbracoApiControllerBase(IGlobalSettings globalSettings, IUmbracoContextAccessor umbracoContextAccessor, ISqlContext sqlContext, ServiceContext services, AppCaches appCaches, IProfilingLogger logger, IRuntimeState runtimeState, UmbracoMapper umbracoMapper, IPublishedUrlProvider publishedUrlProvider) - // { - // UmbracoContextAccessor = umbracoContextAccessor; - // GlobalSettings = globalSettings; - // SqlContext = sqlContext; - // Services = services; - // AppCaches = appCaches; - // Logger = logger; - // RuntimeState = runtimeState; - // Mapper = umbracoMapper; - // PublishedUrlProvider = publishedUrlProvider; - // } - // - // /// - // /// Gets a unique instance identifier. - // /// - // /// For debugging purposes. - // internal Guid InstanceId { get; } = Guid.NewGuid(); - // - // /// - // /// Gets the Umbraco context. - // /// - // public virtual IGlobalSettings GlobalSettings { get; } - // - // /// - // /// Gets the Umbraco context. - // /// - // public virtual IUmbracoContext UmbracoContext => UmbracoContextAccessor.UmbracoContext; - // - // /// - // /// Gets the Umbraco context accessor. - // /// - // public virtual IUmbracoContextAccessor UmbracoContextAccessor { get; } - // - // - // /// - // /// Gets the sql context. - // /// - // public ISqlContext SqlContext { get; } - // - // /// - // /// Gets the services context. - // /// - // public ServiceContext Services { get; } - // - // /// - // /// Gets the application cache. - // /// - // public AppCaches AppCaches { get; } - // - // /// - // /// Gets the logger. - // /// - // public IProfilingLogger Logger { get; } - // - // /// - // /// Gets the runtime state. - // /// - // internal IRuntimeState RuntimeState { get; } - // - // /// - // /// Gets the application url. - // /// - // protected Uri ApplicationUrl => RuntimeState.ApplicationUrl; - // - // /// - // /// Gets the mapper. - // /// - // public UmbracoMapper Mapper { get; } - // - // protected IPublishedUrlProvider PublishedUrlProvider { get; } - // - // /// - // /// Gets the web security helper. - // /// - // public IWebSecurity Security => UmbracoContext.Security; } }