Amended injection of further settings to use IOptionsSnapshot.
This commit is contained in:
@@ -12,6 +12,8 @@ using Umbraco.Core.Mapping;
|
||||
using Umbraco.Core.Services;
|
||||
using Umbraco.Web.Common.Attributes;
|
||||
using Umbraco.Web.Security;
|
||||
using Umbraco.Core.Configuration.Models;
|
||||
using Microsoft.Extensions.Options;
|
||||
|
||||
namespace Umbraco.Web.BackOffice.Controllers
|
||||
{
|
||||
@@ -19,21 +21,21 @@ namespace Umbraco.Web.BackOffice.Controllers
|
||||
public class RedirectUrlManagementController : UmbracoAuthorizedApiController
|
||||
{
|
||||
private readonly ILogger _logger;
|
||||
private readonly IWebRoutingSettings _webRoutingSettings;
|
||||
private readonly WebRoutingSettings _webRoutingSettings;
|
||||
private readonly IWebSecurity _webSecurity;
|
||||
private readonly IRedirectUrlService _redirectUrlService;
|
||||
private readonly UmbracoMapper _umbracoMapper;
|
||||
private readonly IHostingEnvironment _hostingEnvironment;
|
||||
|
||||
public RedirectUrlManagementController(ILogger logger,
|
||||
IWebRoutingSettings webRoutingSettings,
|
||||
IOptionsSnapshot<WebRoutingSettings> webRoutingSettings,
|
||||
IWebSecurity webSecurity,
|
||||
IRedirectUrlService redirectUrlService,
|
||||
UmbracoMapper umbracoMapper,
|
||||
IHostingEnvironment hostingEnvironment)
|
||||
{
|
||||
_logger = logger ?? throw new ArgumentNullException(nameof(logger));
|
||||
_webRoutingSettings = webRoutingSettings ?? throw new ArgumentNullException(nameof(webRoutingSettings));
|
||||
_webRoutingSettings = webRoutingSettings.Value ?? throw new ArgumentNullException(nameof(webRoutingSettings));
|
||||
_webSecurity = webSecurity ?? throw new ArgumentNullException(nameof(webSecurity));
|
||||
_redirectUrlService = redirectUrlService ?? throw new ArgumentNullException(nameof(redirectUrlService));
|
||||
_umbracoMapper = umbracoMapper ?? throw new ArgumentNullException(nameof(umbracoMapper));
|
||||
|
||||
Reference in New Issue
Block a user