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)));
            }
        }
コード例 #2
0
 public InAppNotifier(ApplicationDbContext dbContext, INotificationCrossDomainRepository notificationCrossDomainRepository)
 {
     _dbContext = dbContext;
     _notificationCrossDomainRepository = notificationCrossDomainRepository;
 }
コード例 #3
0
 public MailNotifier(INotificationCrossDomainRepository notificationCrossDomainRepository, IFluentEmail email)
 {
     _notificationCrossDomainRepository = notificationCrossDomainRepository;
     _email = email;
 }