Fix issue where MSDI confused which ctor to use for EmailSender

This commit is contained in:
Paul Johnson
2021-08-19 14:11:40 +01:00
parent bd875c027d
commit 6b18f93ae7

View File

@@ -30,11 +30,15 @@ namespace Umbraco.Cms.Infrastructure
ILogger<EmailSender> logger,
IOptions<GlobalSettings> globalSettings,
IEventAggregator eventAggregator)
: this(globalSettings, eventAggregator, null)
=> _logger = logger;
: this(logger, globalSettings, eventAggregator, null) { }
public EmailSender(IOptions<GlobalSettings> globalSettings, IEventAggregator eventAggregator, INotificationHandler<SendEmailNotification> handler)
public EmailSender(
ILogger<EmailSender> logger,
IOptions<GlobalSettings> globalSettings,
IEventAggregator eventAggregator,
INotificationHandler<SendEmailNotification> handler)
{
_logger = logger;
_eventAggregator = eventAggregator;
_globalSettings = globalSettings.Value;
_notificationHandlerRegistered = handler is not null;