Amended injection of further settings to use IOptionsSnapshot.
This commit is contained in:
@@ -1,11 +1,13 @@
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.AspNetCore.Mvc.ViewEngines;
|
||||
using Microsoft.Extensions.Options;
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Threading.Tasks;
|
||||
using Umbraco.Core;
|
||||
using Umbraco.Core.Configuration;
|
||||
using Umbraco.Core.Configuration.Models;
|
||||
using Umbraco.Core.Configuration.UmbracoSettings;
|
||||
using Umbraco.Core.Hosting;
|
||||
using Umbraco.Core.Services;
|
||||
@@ -28,7 +30,7 @@ namespace Umbraco.Web.BackOffice.Controllers
|
||||
public class PreviewController : Controller
|
||||
{
|
||||
private readonly UmbracoFeatures _features;
|
||||
private readonly IGlobalSettings _globalSettings;
|
||||
private readonly GlobalSettings _globalSettings;
|
||||
private readonly IPublishedSnapshotService _publishedSnapshotService;
|
||||
private readonly IWebSecurity _webSecurity;
|
||||
private readonly ILocalizationService _localizationService;
|
||||
@@ -39,7 +41,7 @@ namespace Umbraco.Web.BackOffice.Controllers
|
||||
|
||||
public PreviewController(
|
||||
UmbracoFeatures features,
|
||||
IGlobalSettings globalSettings,
|
||||
IOptionsSnapshot<GlobalSettings> globalSettings,
|
||||
IPublishedSnapshotService publishedSnapshotService,
|
||||
IWebSecurity webSecurity,
|
||||
ILocalizationService localizationService,
|
||||
@@ -49,7 +51,7 @@ namespace Umbraco.Web.BackOffice.Controllers
|
||||
ICompositeViewEngine viewEngines)
|
||||
{
|
||||
_features = features;
|
||||
_globalSettings = globalSettings;
|
||||
_globalSettings = globalSettings.Value;
|
||||
_publishedSnapshotService = publishedSnapshotService;
|
||||
_webSecurity = webSecurity;
|
||||
_localizationService = localizationService;
|
||||
|
||||
Reference in New Issue
Block a user