Converted to IOptions over IOptionsSnapshot due to the latter only working in scoped services.

Further amends to return to booting application.
This commit is contained in:
Andy Butland
2020-08-23 23:36:48 +02:00
parent 2f22313ceb
commit 2cd91a5a54
108 changed files with 230 additions and 146 deletions

View File

@@ -37,7 +37,7 @@ namespace Umbraco.Web.Models.Mapping
public ContentTypeMapDefinition(CommonMapper commonMapper, PropertyEditorCollection propertyEditors, IDataTypeService dataTypeService, IFileService fileService,
IContentTypeService contentTypeService, IMediaTypeService mediaTypeService, IMemberTypeService memberTypeService,
ILogger logger, IShortStringHelper shortStringHelper, IOptionsSnapshot<GlobalSettings> globalSettings, IHostingEnvironment hostingEnvironment)
ILogger logger, IShortStringHelper shortStringHelper, IOptions<GlobalSettings> globalSettings, IHostingEnvironment hostingEnvironment)
{
_commonMapper = commonMapper;
_propertyEditors = propertyEditors;

View File

@@ -18,7 +18,7 @@ namespace Umbraco.Web.Models.Mapping
private readonly ILogger _logger;
private readonly ContentSettings _contentSettings;
public DataTypeMapDefinition(PropertyEditorCollection propertyEditors, ILogger logger, IOptionsSnapshot<ContentSettings> contentSettings)
public DataTypeMapDefinition(PropertyEditorCollection propertyEditors, ILogger logger, IOptions<ContentSettings> contentSettings)
{
_propertyEditors = propertyEditors;
_logger = logger;

View File

@@ -38,7 +38,7 @@ namespace Umbraco.Web.Models.Mapping
IMemberTypeService memberTypeService,
IMemberService memberService,
IMemberGroupService memberGroupService,
IOptionsSnapshot<MemberPasswordConfigurationSettings> memberPasswordConfiguration,
IOptions<MemberPasswordConfigurationSettings> memberPasswordConfiguration,
IContentTypeBaseServiceProvider contentTypeBaseServiceProvider,
PropertyEditorCollection propertyEditorCollection)
: base(cultureDictionary, localizedTextService, contentTypeBaseServiceProvider)

View File

@@ -37,7 +37,7 @@ namespace Umbraco.Web.Models.Mapping
private readonly IImageUrlGenerator _imageUrlGenerator;
public UserMapDefinition(ILocalizedTextService textService, IUserService userService, IEntityService entityService, ISectionService sectionService,
AppCaches appCaches, ActionCollection actions, IOptionsSnapshot<GlobalSettings> globalSettings, IMediaFileSystem mediaFileSystem, IShortStringHelper shortStringHelper,
AppCaches appCaches, ActionCollection actions, IOptions<GlobalSettings> globalSettings, IMediaFileSystem mediaFileSystem, IShortStringHelper shortStringHelper,
IImageUrlGenerator imageUrlGenerator)
{
_sectionService = sectionService;