Amended injection of further settings to use IOptionsSnapshot.

This commit is contained in:
Andy Butland
2020-08-21 14:52:47 +01:00
parent e3a44c6717
commit 510bd92e78
157 changed files with 774 additions and 550 deletions

View File

@@ -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));