Use IOptionsSnapshot in transient services

This commit is contained in:
Zeegaan
2021-09-23 08:33:16 +02:00
parent 27b85aa08f
commit cefed26563
3 changed files with 14 additions and 15 deletions

View File

@@ -25,7 +25,7 @@ namespace Umbraco.Cms.Infrastructure.ModelsBuilder
{
private static int s_req;
private readonly ILogger<AutoModelsNotificationHandler> _logger;
private readonly ModelsBuilderSettings _config;
private ModelsBuilderSettings _config;
private readonly ModelsGenerator _modelGenerator;
private readonly ModelsGenerationError _mbErrors;
private readonly IMainDom _mainDom;
@@ -35,7 +35,7 @@ namespace Umbraco.Cms.Infrastructure.ModelsBuilder
/// </summary>
public AutoModelsNotificationHandler(
ILogger<AutoModelsNotificationHandler> logger,
IOptions<ModelsBuilderSettings> config,
IOptionsSnapshot<ModelsBuilderSettings> config,
ModelsGenerator modelGenerator,
ModelsGenerationError mbErrors,
IMainDom mainDom)