From e11d6ac280c374fd293a43e9d192a504bc3cdc40 Mon Sep 17 00:00:00 2001 From: Nikolaj Geisle Date: Mon, 27 Sep 2021 09:58:44 +0200 Subject: [PATCH] Updated classes to use IOptionsMonitor or IOptionsSnapshot instead of IOptions --- .../Security/UmbracoUserManager.cs | 9 +++++---- .../Security/MemberManagerTests.cs | 6 +++--- .../Routing/RoutableDocumentFilterTests.cs | 5 +++-- .../Controllers/RenderNoContentControllerTests.cs | 4 ++-- src/Umbraco.Web.BackOffice/Services/IconService.cs | 10 ++++++---- .../Filters/JsonDateTimeFormatAttribute.cs | 9 ++++----- .../Filters/ModelBindingExceptionAttribute.cs | 2 +- .../Filters/OutgoingNoHyphenGuidFormatAttribute.cs | 9 ++++----- .../Localization/UmbracoRequestLocalizationOptions.cs | 10 +++++++--- src/Umbraco.Web.Common/Macros/MacroRenderer.cs | 8 +++++--- .../Middleware/UmbracoRequestMiddleware.cs | 8 +++++--- .../Security/BackOfficeUserManager.cs | 2 +- src/Umbraco.Web.Common/Security/MemberManager.cs | 2 +- src/Umbraco.Web.Common/Templates/TemplateRenderer.cs | 8 +++++--- .../Controllers/RenderNoContentController.cs | 10 +++++----- 15 files changed, 57 insertions(+), 45 deletions(-) diff --git a/src/Umbraco.Infrastructure/Security/UmbracoUserManager.cs b/src/Umbraco.Infrastructure/Security/UmbracoUserManager.cs index bf198af1c3..dda9f854f2 100644 --- a/src/Umbraco.Infrastructure/Security/UmbracoUserManager.cs +++ b/src/Umbraco.Infrastructure/Security/UmbracoUserManager.cs @@ -35,11 +35,12 @@ namespace Umbraco.Cms.Core.Security IdentityErrorDescriber errors, IServiceProvider services, ILogger> logger, - IOptions passwordConfiguration) + IOptionsMonitor passwordConfiguration) : base(store, optionsAccessor, passwordHasher, userValidators, passwordValidators, new NoopLookupNormalizer(), errors, services, logger) { IpResolver = ipResolver ?? throw new ArgumentNullException(nameof(ipResolver)); - PasswordConfiguration = passwordConfiguration.Value ?? throw new ArgumentNullException(nameof(passwordConfiguration)); + PasswordConfiguration = passwordConfiguration.CurrentValue ?? throw new ArgumentNullException(nameof(passwordConfiguration)); + passwordConfiguration.OnChange(x => PasswordConfiguration = x); } /// @@ -60,7 +61,7 @@ namespace Umbraco.Cms.Core.Security /// /// Gets the password configuration /// - public IPasswordConfiguration PasswordConfiguration { get; } + public IPasswordConfiguration PasswordConfiguration { get; private set; } /// /// Gets the IP resolver @@ -96,7 +97,7 @@ namespace Umbraco.Cms.Core.Security string password = _passwordGenerator.GeneratePassword(); return password; } - + /// /// Used to validate the password without an identity user /// Validation code is based on the default ValidatePasswordAsync code diff --git a/src/Umbraco.Tests.UnitTests/Umbraco.Infrastructure/Security/MemberManagerTests.cs b/src/Umbraco.Tests.UnitTests/Umbraco.Infrastructure/Security/MemberManagerTests.cs index 88b2aa25bc..fcb8a765f6 100644 --- a/src/Umbraco.Tests.UnitTests/Umbraco.Infrastructure/Security/MemberManagerTests.cs +++ b/src/Umbraco.Tests.UnitTests/Umbraco.Infrastructure/Security/MemberManagerTests.cs @@ -32,7 +32,7 @@ namespace Umbraco.Cms.Tests.UnitTests.Umbraco.Infrastructure.Security private Mock> _mockPasswordHasher; private Mock _mockMemberService; private Mock _mockServiceProviders; - private Mock> _mockPasswordConfiguration; + private Mock> _mockPasswordConfiguration; public MemberManager CreateSut() { @@ -65,8 +65,8 @@ namespace Umbraco.Cms.Tests.UnitTests.Umbraco.Infrastructure.Security userValidators.Add(validator.Object); _mockServiceProviders = new Mock(); - _mockPasswordConfiguration = new Mock>(); - _mockPasswordConfiguration.Setup(x => x.Value).Returns(() => + _mockPasswordConfiguration = new Mock>(); + _mockPasswordConfiguration.Setup(x => x.CurrentValue).Returns(() => new MemberPasswordConfigurationSettings() { diff --git a/src/Umbraco.Tests.UnitTests/Umbraco.Web.Common/Routing/RoutableDocumentFilterTests.cs b/src/Umbraco.Tests.UnitTests/Umbraco.Web.Common/Routing/RoutableDocumentFilterTests.cs index 3613de093f..bb1c76e533 100644 --- a/src/Umbraco.Tests.UnitTests/Umbraco.Web.Common/Routing/RoutableDocumentFilterTests.cs +++ b/src/Umbraco.Tests.UnitTests/Umbraco.Web.Common/Routing/RoutableDocumentFilterTests.cs @@ -9,6 +9,7 @@ using NUnit.Framework; using Umbraco.Cms.Core; using Umbraco.Cms.Core.Configuration.Models; using Umbraco.Cms.Core.Hosting; +using Umbraco.Cms.Tests.Common; using Umbraco.Cms.Web.Common.Routing; namespace Umbraco.Cms.Tests.UnitTests.Umbraco.Web.Common.Routing @@ -91,7 +92,7 @@ namespace Umbraco.Cms.Tests.UnitTests.Umbraco.Web.Common.Routing var endpointDataSource = new DefaultEndpointDataSource(endpoint1, endpoint2); var routableDocFilter = new RoutableDocumentFilter( - Options.Create(globalSettings), + new TestOptionsSnapshot(globalSettings), Options.Create(routingSettings), GetHostingEnvironment(), endpointDataSource); @@ -120,7 +121,7 @@ namespace Umbraco.Cms.Tests.UnitTests.Umbraco.Web.Common.Routing var endpointDataSource = new DefaultEndpointDataSource(endpoint1); var routableDocFilter = new RoutableDocumentFilter( - Options.Create(globalSettings), + new TestOptionsSnapshot(globalSettings), Options.Create(routingSettings), GetHostingEnvironment(), endpointDataSource); diff --git a/src/Umbraco.Tests.UnitTests/Umbraco.Web.Website/Controllers/RenderNoContentControllerTests.cs b/src/Umbraco.Tests.UnitTests/Umbraco.Web.Website/Controllers/RenderNoContentControllerTests.cs index 52c976d8c1..dae3cfdb9e 100644 --- a/src/Umbraco.Tests.UnitTests/Umbraco.Web.Website/Controllers/RenderNoContentControllerTests.cs +++ b/src/Umbraco.Tests.UnitTests/Umbraco.Web.Website/Controllers/RenderNoContentControllerTests.cs @@ -23,7 +23,7 @@ namespace Umbraco.Cms.Tests.UnitTests.Umbraco.Web.Website.Controllers var mockUmbracoContext = new Mock(); mockUmbracoContext.Setup(x => x.Content.HasContent()).Returns(true); var mockIOHelper = new Mock(); - var controller = new RenderNoContentController(new TestUmbracoContextAccessor(mockUmbracoContext.Object), mockIOHelper.Object, Options.Create(new GlobalSettings())); + var controller = new RenderNoContentController(new TestUmbracoContextAccessor(mockUmbracoContext.Object), mockIOHelper.Object, new TestOptionsSnapshot(new GlobalSettings())); var result = controller.Index() as RedirectResult; @@ -42,7 +42,7 @@ namespace Umbraco.Cms.Tests.UnitTests.Umbraco.Web.Website.Controllers var mockIOHelper = new Mock(); mockIOHelper.Setup(x => x.ResolveUrl(It.Is(y => y == UmbracoPathSetting))).Returns(UmbracoPath); - IOptions globalSettings = Options.Create(new GlobalSettings() + var globalSettings = new TestOptionsSnapshot(new GlobalSettings() { UmbracoPath = UmbracoPathSetting, NoNodesViewPath = ViewPath, diff --git a/src/Umbraco.Web.BackOffice/Services/IconService.cs b/src/Umbraco.Web.BackOffice/Services/IconService.cs index a1d634f41b..8c5968e6b0 100644 --- a/src/Umbraco.Web.BackOffice/Services/IconService.cs +++ b/src/Umbraco.Web.BackOffice/Services/IconService.cs @@ -15,18 +15,20 @@ namespace Umbraco.Cms.Web.BackOffice.Services { public class IconService : IIconService { - private readonly IOptions _globalSettings; + private GlobalSettings _globalSettings; private readonly IHostingEnvironment _hostingEnvironment; private readonly IAppPolicyCache _cache; public IconService( - IOptions globalSettings, + IOptionsMonitor globalSettings, IHostingEnvironment hostingEnvironment, AppCaches appCaches) { - _globalSettings = globalSettings; + _globalSettings = globalSettings.CurrentValue; _hostingEnvironment = hostingEnvironment; _cache = appCaches.RuntimeCache; + + globalSettings.OnChange(x => _globalSettings = x); } /// @@ -114,7 +116,7 @@ namespace Umbraco.Cms.Web.BackOffice.Services } // add icons from IconsPath if not already added from plugins - var coreIconsDirectory = new DirectoryInfo(_hostingEnvironment.MapPathWebRoot($"{_globalSettings.Value.IconsPath}/")); + var coreIconsDirectory = new DirectoryInfo(_hostingEnvironment.MapPathWebRoot($"{_globalSettings.IconsPath}/")); var coreIcons = coreIconsDirectory.GetFiles("*.svg"); icons.UnionWith(coreIcons); diff --git a/src/Umbraco.Web.Common/Filters/JsonDateTimeFormatAttribute.cs b/src/Umbraco.Web.Common/Filters/JsonDateTimeFormatAttribute.cs index 8e4b04c678..98d818ba08 100644 --- a/src/Umbraco.Web.Common/Filters/JsonDateTimeFormatAttribute.cs +++ b/src/Umbraco.Web.Common/Filters/JsonDateTimeFormatAttribute.cs @@ -25,12 +25,12 @@ namespace Umbraco.Cms.Web.Common.Filters private readonly string _format = "yyyy-MM-dd HH:mm:ss"; private readonly ArrayPool _arrayPool; - private readonly IOptions _options; + private readonly MvcOptions _options; - public JsonDateTimeFormatFilter(ArrayPool arrayPool, IOptions options) + public JsonDateTimeFormatFilter(ArrayPool arrayPool, IOptionsSnapshot options) { _arrayPool = arrayPool; - _options = options; + _options = options.Value; } public void OnResultExecuted(ResultExecutedContext context) @@ -47,9 +47,8 @@ namespace Umbraco.Cms.Web.Common.Filters { DateTimeFormat = _format }); - objectResult.Formatters.Clear(); - objectResult.Formatters.Add(new AngularJsonMediaTypeFormatter(serializerSettings, _arrayPool, _options.Value)); + objectResult.Formatters.Add(new AngularJsonMediaTypeFormatter(serializerSettings, _arrayPool, _options)); } } } diff --git a/src/Umbraco.Web.Common/Filters/ModelBindingExceptionAttribute.cs b/src/Umbraco.Web.Common/Filters/ModelBindingExceptionAttribute.cs index 5b8421b9cb..1ef244dbe3 100644 --- a/src/Umbraco.Web.Common/Filters/ModelBindingExceptionAttribute.cs +++ b/src/Umbraco.Web.Common/Filters/ModelBindingExceptionAttribute.cs @@ -37,7 +37,7 @@ namespace Umbraco.Cms.Web.Common.Filters private readonly ExceptionFilterSettings _exceptionFilterSettings; private readonly IPublishedModelFactory _publishedModelFactory; - public ModelBindingExceptionFilter(IOptions exceptionFilterSettings, IPublishedModelFactory publishedModelFactory) + public ModelBindingExceptionFilter(IOptionsSnapshot exceptionFilterSettings, IPublishedModelFactory publishedModelFactory) { _exceptionFilterSettings = exceptionFilterSettings.Value; _publishedModelFactory = publishedModelFactory ?? throw new ArgumentNullException(nameof(publishedModelFactory)); diff --git a/src/Umbraco.Web.Common/Filters/OutgoingNoHyphenGuidFormatAttribute.cs b/src/Umbraco.Web.Common/Filters/OutgoingNoHyphenGuidFormatAttribute.cs index 602438008b..dd0f78fde1 100644 --- a/src/Umbraco.Web.Common/Filters/OutgoingNoHyphenGuidFormatAttribute.cs +++ b/src/Umbraco.Web.Common/Filters/OutgoingNoHyphenGuidFormatAttribute.cs @@ -18,14 +18,13 @@ namespace Umbraco.Cms.Web.Common.Filters private class OutgoingNoHyphenGuidFormatFilter : IResultFilter { - private readonly IOptions _mvcNewtonsoftJsonOptions; private readonly ArrayPool _arrayPool; - private readonly IOptions _options; + private readonly MvcOptions _options; - public OutgoingNoHyphenGuidFormatFilter(ArrayPool arrayPool, IOptions options) + public OutgoingNoHyphenGuidFormatFilter(ArrayPool arrayPool, IOptionsSnapshot options) { _arrayPool = arrayPool; - _options = options; + _options = options.Value; } public void OnResultExecuted(ResultExecutedContext context) { @@ -39,7 +38,7 @@ namespace Umbraco.Cms.Web.Common.Filters serializerSettings.Converters.Add(new GuidNoHyphenConverter()); objectResult.Formatters.Clear(); - objectResult.Formatters.Add(new AngularJsonMediaTypeFormatter(serializerSettings, _arrayPool, _options.Value)); + objectResult.Formatters.Add(new AngularJsonMediaTypeFormatter(serializerSettings, _arrayPool, _options)); } } diff --git a/src/Umbraco.Web.Common/Localization/UmbracoRequestLocalizationOptions.cs b/src/Umbraco.Web.Common/Localization/UmbracoRequestLocalizationOptions.cs index 9d8718a5f4..aa128629b0 100644 --- a/src/Umbraco.Web.Common/Localization/UmbracoRequestLocalizationOptions.cs +++ b/src/Umbraco.Web.Common/Localization/UmbracoRequestLocalizationOptions.cs @@ -11,18 +11,22 @@ namespace Umbraco.Cms.Web.Common.Localization /// public class UmbracoRequestLocalizationOptions : IConfigureOptions { - private readonly IOptions _globalSettings; + private GlobalSettings _globalSettings; /// /// Initializes a new instance of the class. /// - public UmbracoRequestLocalizationOptions(IOptions globalSettings) => _globalSettings = globalSettings; + public UmbracoRequestLocalizationOptions(IOptionsMonitor globalSettings) + { + _globalSettings = globalSettings.CurrentValue; + globalSettings.OnChange(x => _globalSettings = x); + } /// public void Configure(RequestLocalizationOptions options) { // set the default culture to what is in config - options.DefaultRequestCulture = new RequestCulture(_globalSettings.Value.DefaultUILanguage); + options.DefaultRequestCulture = new RequestCulture(_globalSettings.DefaultUILanguage); // add a custom provider if (options.RequestCultureProviders == null) diff --git a/src/Umbraco.Web.Common/Macros/MacroRenderer.cs b/src/Umbraco.Web.Common/Macros/MacroRenderer.cs index fa5de8e165..3a80e555c3 100644 --- a/src/Umbraco.Web.Common/Macros/MacroRenderer.cs +++ b/src/Umbraco.Web.Common/Macros/MacroRenderer.cs @@ -28,7 +28,7 @@ namespace Umbraco.Cms.Web.Common.Macros private readonly IProfilingLogger _profilingLogger; private readonly ILogger _logger; private readonly IUmbracoContextAccessor _umbracoContextAccessor; - private readonly ContentSettings _contentSettings; + private ContentSettings _contentSettings; private readonly ILocalizedTextService _textService; private readonly AppCaches _appCaches; private readonly IMacroService _macroService; @@ -43,7 +43,7 @@ namespace Umbraco.Cms.Web.Common.Macros IProfilingLogger profilingLogger, ILogger logger, IUmbracoContextAccessor umbracoContextAccessor, - IOptions contentSettings, + IOptionsMonitor contentSettings, ILocalizedTextService textService, AppCaches appCaches, IMacroService macroService, @@ -57,7 +57,7 @@ namespace Umbraco.Cms.Web.Common.Macros _profilingLogger = profilingLogger ?? throw new ArgumentNullException(nameof(profilingLogger)); _logger = logger; _umbracoContextAccessor = umbracoContextAccessor ?? throw new ArgumentNullException(nameof(umbracoContextAccessor)); - _contentSettings = contentSettings.Value ?? throw new ArgumentNullException(nameof(contentSettings)); + _contentSettings = contentSettings.CurrentValue ?? throw new ArgumentNullException(nameof(contentSettings)); _textService = textService; _appCaches = appCaches ?? throw new ArgumentNullException(nameof(appCaches)); _macroService = macroService ?? throw new ArgumentNullException(nameof(macroService)); @@ -67,6 +67,8 @@ namespace Umbraco.Cms.Web.Common.Macros _requestAccessor = requestAccessor; _partialViewMacroEngine = partialViewMacroEngine; _httpContextAccessor = httpContextAccessor; + + contentSettings.OnChange(x => _contentSettings = x); } #region MacroContent cache diff --git a/src/Umbraco.Web.Common/Middleware/UmbracoRequestMiddleware.cs b/src/Umbraco.Web.Common/Middleware/UmbracoRequestMiddleware.cs index 539c1c844f..2b83d1e33a 100644 --- a/src/Umbraco.Web.Common/Middleware/UmbracoRequestMiddleware.cs +++ b/src/Umbraco.Web.Common/Middleware/UmbracoRequestMiddleware.cs @@ -53,7 +53,7 @@ namespace Umbraco.Cms.Web.Common.Middleware private readonly IRuntimeState _runtimeState; private readonly IVariationContextAccessor _variationContextAccessor; private readonly IDefaultCultureAccessor _defaultCultureAccessor; - private readonly SmidgeOptions _smidgeOptions; + private SmidgeOptions _smidgeOptions; private readonly WebProfiler _profiler; private static bool s_cacheInitialized; @@ -79,7 +79,7 @@ namespace Umbraco.Cms.Web.Common.Middleware IHostingEnvironment hostingEnvironment, UmbracoRequestPaths umbracoRequestPaths, BackOfficeWebAssets backOfficeWebAssets, - IOptions smidgeOptions, + IOptionsMonitor smidgeOptions, IRuntimeState runtimeState, IVariationContextAccessor variationContextAccessor, IDefaultCultureAccessor defaultCultureAccessor) @@ -95,8 +95,10 @@ namespace Umbraco.Cms.Web.Common.Middleware _runtimeState = runtimeState; _variationContextAccessor = variationContextAccessor; _defaultCultureAccessor = defaultCultureAccessor; - _smidgeOptions = smidgeOptions.Value; + _smidgeOptions = smidgeOptions.CurrentValue; _profiler = profiler as WebProfiler; // Ignore if not a WebProfiler + + smidgeOptions.OnChange(x => _smidgeOptions = x); } /// diff --git a/src/Umbraco.Web.Common/Security/BackOfficeUserManager.cs b/src/Umbraco.Web.Common/Security/BackOfficeUserManager.cs index 505abdbe0e..0f3d6f6784 100644 --- a/src/Umbraco.Web.Common/Security/BackOfficeUserManager.cs +++ b/src/Umbraco.Web.Common/Security/BackOfficeUserManager.cs @@ -34,7 +34,7 @@ namespace Umbraco.Cms.Web.Common.Security IServiceProvider services, IHttpContextAccessor httpContextAccessor, ILogger> logger, - IOptions passwordConfiguration, + IOptionsMonitor passwordConfiguration, IEventAggregator eventAggregator, IBackOfficeUserPasswordChecker backOfficeUserPasswordChecker) : base(ipResolver, store, optionsAccessor, passwordHasher, userValidators, passwordValidators, errors, services, logger, passwordConfiguration) diff --git a/src/Umbraco.Web.Common/Security/MemberManager.cs b/src/Umbraco.Web.Common/Security/MemberManager.cs index 9a0f26aff4..1962af8d19 100644 --- a/src/Umbraco.Web.Common/Security/MemberManager.cs +++ b/src/Umbraco.Web.Common/Security/MemberManager.cs @@ -34,7 +34,7 @@ namespace Umbraco.Cms.Web.Common.Security IdentityErrorDescriber errors, IServiceProvider services, ILogger> logger, - IOptions passwordConfiguration, + IOptionsMonitor passwordConfiguration, IPublicAccessService publicAccessService, IHttpContextAccessor httpContextAccessor) : base(ipResolver, store, optionsAccessor, passwordHasher, userValidators, passwordValidators, errors, diff --git a/src/Umbraco.Web.Common/Templates/TemplateRenderer.cs b/src/Umbraco.Web.Common/Templates/TemplateRenderer.cs index 9dc0ef7477..92ec2fa962 100644 --- a/src/Umbraco.Web.Common/Templates/TemplateRenderer.cs +++ b/src/Umbraco.Web.Common/Templates/TemplateRenderer.cs @@ -35,7 +35,7 @@ namespace Umbraco.Cms.Web.Common.Templates private readonly IPublishedRouter _publishedRouter; private readonly IFileService _fileService; private readonly ILocalizationService _languageService; - private readonly WebRoutingSettings _webRoutingSettings; + private WebRoutingSettings _webRoutingSettings; private readonly IHttpContextAccessor _httpContextAccessor; private readonly ICompositeViewEngine _viewEngine; private readonly IModelMetadataProvider _modelMetadataProvider; @@ -46,7 +46,7 @@ namespace Umbraco.Cms.Web.Common.Templates IPublishedRouter publishedRouter, IFileService fileService, ILocalizationService textService, - IOptions webRoutingSettings, + IOptionsMonitor webRoutingSettings, IHttpContextAccessor httpContextAccessor, ICompositeViewEngine viewEngine, IModelMetadataProvider modelMetadataProvider, @@ -56,11 +56,13 @@ namespace Umbraco.Cms.Web.Common.Templates _publishedRouter = publishedRouter ?? throw new ArgumentNullException(nameof(publishedRouter)); _fileService = fileService ?? throw new ArgumentNullException(nameof(fileService)); _languageService = textService ?? throw new ArgumentNullException(nameof(textService)); - _webRoutingSettings = webRoutingSettings.Value ?? throw new ArgumentNullException(nameof(webRoutingSettings)); + _webRoutingSettings = webRoutingSettings.CurrentValue ?? throw new ArgumentNullException(nameof(webRoutingSettings)); _httpContextAccessor = httpContextAccessor ?? throw new ArgumentNullException(nameof(httpContextAccessor)); _viewEngine = viewEngine ?? throw new ArgumentNullException(nameof(viewEngine)); _modelMetadataProvider = modelMetadataProvider; _tempDataDictionaryFactory = tempDataDictionaryFactory; + + webRoutingSettings.OnChange(x => _webRoutingSettings = x); } public async Task RenderAsync(int pageId, int? altTemplateId, StringWriter writer) diff --git a/src/Umbraco.Web.Website/Controllers/RenderNoContentController.cs b/src/Umbraco.Web.Website/Controllers/RenderNoContentController.cs index 84c6ce08bc..04d2dd53f1 100644 --- a/src/Umbraco.Web.Website/Controllers/RenderNoContentController.cs +++ b/src/Umbraco.Web.Website/Controllers/RenderNoContentController.cs @@ -13,13 +13,13 @@ namespace Umbraco.Cms.Web.Website.Controllers { private readonly IUmbracoContextAccessor _umbracoContextAccessor; private readonly IIOHelper _ioHelper; - private readonly IOptions _globalSettings; + private readonly GlobalSettings _globalSettings; - public RenderNoContentController(IUmbracoContextAccessor umbracoContextAccessor, IIOHelper ioHelper, IOptions globalSettings) + public RenderNoContentController(IUmbracoContextAccessor umbracoContextAccessor, IIOHelper ioHelper, IOptionsSnapshot globalSettings) { _umbracoContextAccessor = umbracoContextAccessor ?? throw new ArgumentNullException(nameof(umbracoContextAccessor)); _ioHelper = ioHelper ?? throw new ArgumentNullException(nameof(ioHelper)); - _globalSettings = globalSettings ?? throw new ArgumentNullException(nameof(globalSettings)); + _globalSettings = globalSettings.Value ?? throw new ArgumentNullException(nameof(globalSettings)); } public ActionResult Index() @@ -34,10 +34,10 @@ namespace Umbraco.Cms.Web.Website.Controllers var model = new NoNodesViewModel { - UmbracoPath = _ioHelper.ResolveUrl(_globalSettings.Value.UmbracoPath), + UmbracoPath = _ioHelper.ResolveUrl(_globalSettings.UmbracoPath), }; - return View(_globalSettings.Value.NoNodesViewPath, model); + return View(_globalSettings.NoNodesViewPath, model); } } }