Reverted non netcore related project amends in order to limit changes to those necessary for the netcore executable call stack.
This commit is contained in:
@@ -1,10 +1,8 @@
|
||||
using System;
|
||||
using Microsoft.Extensions.Options;
|
||||
using Umbraco.Core;
|
||||
using Umbraco.Core.Cache;
|
||||
using Umbraco.Core.Composing;
|
||||
using Umbraco.Core.Configuration;
|
||||
using Umbraco.Core.Configuration.Models;
|
||||
using Umbraco.Core.Logging;
|
||||
using Umbraco.Core.Mapping;
|
||||
using Umbraco.Core.Persistence;
|
||||
@@ -22,7 +20,7 @@ namespace Umbraco.Web.WebApi
|
||||
{
|
||||
}
|
||||
|
||||
protected UmbracoApiController(IOptionsSnapshot<GlobalSettings> globalSettings, IUmbracoContextAccessor umbracoContextAccessor, ISqlContext sqlContext, ServiceContext services, AppCaches appCaches, IProfilingLogger logger, IRuntimeState runtimeState, UmbracoMapper umbracoMapper, IPublishedUrlProvider publishedUrlProvider)
|
||||
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)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -14,11 +14,11 @@ using Umbraco.Web.Features;
|
||||
using Umbraco.Web.Routing;
|
||||
using Umbraco.Web.Security;
|
||||
using Umbraco.Web.WebApi.Filters;
|
||||
using Microsoft.Extensions.Options;
|
||||
using Umbraco.Core.Configuration.Models;
|
||||
|
||||
namespace Umbraco.Web.WebApi
|
||||
{
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Provides a base class for Umbraco API controllers.
|
||||
/// </summary>
|
||||
@@ -26,6 +26,7 @@ namespace Umbraco.Web.WebApi
|
||||
[FeatureAuthorize]
|
||||
public abstract class UmbracoApiControllerBase : ApiController, IUmbracoFeature
|
||||
{
|
||||
|
||||
// note: all Umbraco controllers have two constructors: one with all dependencies, which should be used,
|
||||
// and one with auto dependencies, ie no dependencies - and then dependencies are automatically obtained
|
||||
// here from the Current service locator - this is obviously evil, but it allows us to add new dependencies
|
||||
@@ -37,7 +38,7 @@ namespace Umbraco.Web.WebApi
|
||||
/// <remarks>Dependencies are obtained from the <see cref="Current"/> service locator.</remarks>
|
||||
protected UmbracoApiControllerBase()
|
||||
: this(
|
||||
Current.Factory.GetInstance<IOptionsSnapshot<GlobalSettings>>(),
|
||||
Current.Factory.GetInstance<IGlobalSettings>(),
|
||||
Current.Factory.GetInstance<IUmbracoContextAccessor>(),
|
||||
Current.Factory.GetInstance<ISqlContext>(),
|
||||
Current.Factory.GetInstance<ServiceContext>(),
|
||||
@@ -52,10 +53,10 @@ namespace Umbraco.Web.WebApi
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="UmbracoApiControllerBase"/> class with all its dependencies.
|
||||
/// </summary>
|
||||
protected UmbracoApiControllerBase(IOptionsSnapshot<GlobalSettings> globalSettings, IUmbracoContextAccessor umbracoContextAccessor, ISqlContext sqlContext, ServiceContext services, AppCaches appCaches, IProfilingLogger logger, IRuntimeState runtimeState, UmbracoMapper umbracoMapper, IPublishedUrlProvider publishedUrlProvider)
|
||||
protected UmbracoApiControllerBase(IGlobalSettings globalSettings, IUmbracoContextAccessor umbracoContextAccessor, ISqlContext sqlContext, ServiceContext services, AppCaches appCaches, IProfilingLogger logger, IRuntimeState runtimeState, UmbracoMapper umbracoMapper, IPublishedUrlProvider publishedUrlProvider)
|
||||
{
|
||||
UmbracoContextAccessor = umbracoContextAccessor;
|
||||
GlobalSettings = globalSettings.Value;
|
||||
GlobalSettings = globalSettings;
|
||||
SqlContext = sqlContext;
|
||||
Services = services;
|
||||
AppCaches = appCaches;
|
||||
@@ -72,9 +73,9 @@ namespace Umbraco.Web.WebApi
|
||||
internal Guid InstanceId { get; } = Guid.NewGuid();
|
||||
|
||||
/// <summary>
|
||||
/// Gets the global settings from configuration.
|
||||
/// Gets the Umbraco context.
|
||||
/// </summary>
|
||||
public virtual GlobalSettings GlobalSettings { get; }
|
||||
public virtual IGlobalSettings GlobalSettings { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the Umbraco context.
|
||||
|
||||
@@ -8,8 +8,6 @@ using Umbraco.Core.Services;
|
||||
using Umbraco.Web.Security;
|
||||
using Umbraco.Core.Mapping;
|
||||
using Umbraco.Web.Routing;
|
||||
using Microsoft.Extensions.Options;
|
||||
using Umbraco.Core.Configuration.Models;
|
||||
|
||||
namespace Umbraco.Web.WebApi
|
||||
{
|
||||
@@ -37,7 +35,7 @@ namespace Umbraco.Web.WebApi
|
||||
{
|
||||
}
|
||||
|
||||
protected UmbracoAuthorizedApiController(IOptionsSnapshot<GlobalSettings> globalSettings, IUmbracoContextAccessor umbracoContextAccessor, ISqlContext sqlContext, ServiceContext services, AppCaches appCaches, IProfilingLogger logger, IRuntimeState runtimeState, UmbracoMapper umbracoMapper, IPublishedUrlProvider publishedUrlProvider)
|
||||
protected UmbracoAuthorizedApiController(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)
|
||||
{
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user