(WIP) migrated TourSettings to use IOptions pattern for configuration.

This commit is contained in:
Andy Butland
2020-08-19 14:14:01 +01:00
parent 0a2ebcd1f1
commit a3e84ea3a8
4 changed files with 12 additions and 23 deletions

View File

@@ -2,7 +2,9 @@
using System.Collections.Generic;
using System.IO;
using System.Linq;
using Microsoft.Extensions.Options;
using Newtonsoft.Json;
using Umbraco.Configuration.Models;
using Umbraco.Core;
using Umbraco.Core.Configuration.UmbracoSettings;
using Umbraco.Core.Hosting;
@@ -19,21 +21,21 @@ namespace Umbraco.Web.BackOffice.Controllers
{
private readonly TourFilterCollection _filters;
private readonly IHostingEnvironment _hostingEnvironment;
private readonly ITourSettings _tourSettings;
private readonly TourSettings _tourSettings;
private readonly IWebSecurity _webSecurity;
private readonly IContentTypeService _contentTypeService;
public TourController(
TourFilterCollection filters,
IHostingEnvironment hostingEnvironment,
ITourSettings tourSettings,
IOptionsSnapshot<TourSettings> tourSettings,
IWebSecurity webSecurity,
IContentTypeService contentTypeService)
{
_filters = filters;
_hostingEnvironment = hostingEnvironment;
_tourSettings = tourSettings;
_tourSettings = tourSettings.Value;
_webSecurity = webSecurity;
_contentTypeService = contentTypeService;
}