public NotificationService(INotificationCrossDomainRepository notificationCrossDomainRepository, IUserRepository userRepository, IServiceProvider serviceProvider, SmtpConfiguration smtpConfiguration) { _notificationCrossDomainRepository = notificationCrossDomainRepository; _userRepository = userRepository; _serviceProvider = serviceProvider; _notifiers = new List <INotifier>(); _notifiers.Add((InAppNotifier)_serviceProvider.GetService(typeof(InAppNotifier))); if (smtpConfiguration.EnableService) { _notifiers.Add((MailNotifier)_serviceProvider.GetService(typeof(MailNotifier))); } }
public InAppNotifier(ApplicationDbContext dbContext, INotificationCrossDomainRepository notificationCrossDomainRepository) { _dbContext = dbContext; _notificationCrossDomainRepository = notificationCrossDomainRepository; }
public MailNotifier(INotificationCrossDomainRepository notificationCrossDomainRepository, IFluentEmail email) { _notificationCrossDomainRepository = notificationCrossDomainRepository; _email = email; }