/// <summary> /// Initializes a new instance of the <see cref="ProcessNotificationQueueItem"/> class. /// </summary> /// <param name="logger">The log.</param> /// <param name="configuration">The configuration.</param> /// <param name="repositoryFactory">The repositoryFactory.</param> /// <param name="httpClientHelper">The httpClientHelper.</param> public ProcessNotificationQueueItem( ILogger logger, IConfiguration configuration, IRepositoryFactory repositoryFactory, IHttpClientHelper httpClientHelper) { this.logger = logger; this.configuration = configuration; this.emailNotificationRepository = repositoryFactory.GetRepository(Enum.TryParse <StorageType>(this.configuration?[Constants.StorageType], out this.repo) ? this.repo : throw new Exception()); this.httpClientHelper = httpClientHelper; }
public EmailNotifierService( ISessionProvider sessionProvider, Settings settings, Logger logger, IEmailNotificationRepository emailNotificationRepository) { _sessionProvider = sessionProvider; _settings = settings; _logger = logger; _emailNotificationRepository = emailNotificationRepository; InitializeComponent(); _processing = false; }
/// <summary> /// Initializes a new instance of the <see cref="NotificationReportManager"/> class. /// <param name="logger">An instance of <see cref="ILogger"/>.</param> /// <param name="repositoryFactory">An instance of <see cref="IRepositoryFactory"/>.</param> /// <param name="configuration">An instance of <see cref="IConfiguration"/>.</param> /// <param name="emailManager">An instance of <see cref="EmailManager"/>.</param> /// <param name="mailTemplateRepository">An instance of <see cref="IMailTemplateRepository"/>.</param> public NotificationReportManager( ILogger logger, IRepositoryFactory repositoryFactory, IConfiguration configuration, IEmailManager emailManager, IMailTemplateRepository mailTemplateRepository) { this.logger = logger; this.configuration = configuration; this.emailNotificationRepository = this.emailNotificationRepository = repositoryFactory.GetRepository(Enum.TryParse <StorageType>(this.configuration?[NotificationService.Common.Constants.StorageType], out this.repo) ? this.repo : throw new Exception("Unknown Database Type")); this.emailManager = emailManager; this.mailTemplateRepository = mailTemplateRepository ?? throw new System.ArgumentNullException(nameof(mailTemplateRepository)); }
/// <summary> /// Initializes a new instance of the <see cref="EmailManager"/> class. /// </summary> /// <param name="configuration">An instance of <see cref="IConfiguration"/>.</param> /// <param name="repositoryFactory">An instance of <see cref="IRepositoryFactory"/>.</param> /// <param name="logger">Instance of Logger.</param> /// <param name="templateManager">Instance of templateManager.</param> /// <param name="templateMerge">Instance of templateMerge.</param> public EmailManager( IConfiguration configuration, IRepositoryFactory repositoryFactory, ILogger logger, IMailTemplateManager templateManager, ITemplateMerge templateMerge) { this.repositoryFactory = repositoryFactory; this.configuration = configuration; this.emailNotificationRepository = repositoryFactory.GetRepository(Enum.TryParse <StorageType>(this.configuration?[Constants.StorageType], out this.repo) ? this.repo : throw new Exception()); this.logger = logger; this.templateManager = templateManager; this.templateMerge = templateMerge; }
/// <summary> /// Initializes a new instance of the <see cref="ProcessNotificationQueueItem"/> class. /// </summary> /// <param name="logger">The log.</param> /// <param name="configuration">The configuration.</param> /// <param name="repositoryFactory">The repositoryFactory.</param> /// <param name="httpClientHelper">The httpClientHelper.</param> /// <param name="refresherProvider">The IConfigurationRefresherProvider.</param> public ProcessNotificationQueueItem( ILogger logger, IConfiguration configuration, IRepositoryFactory repositoryFactory, IHttpClientHelper httpClientHelper, IConfigurationRefresherProvider refresherProvider) { this.logger = logger; this.configuration = configuration; this.emailNotificationRepository = repositoryFactory.GetRepository(Enum.TryParse <StorageType>(this.configuration?[Constants.StorageType], out this.repo) ? this.repo : throw new Exception()); this.httpClientHelper = httpClientHelper; this.configurationRefresher = refresherProvider.Refreshers.First(); //No need to await RefreshKeys(); }
/// <summary> /// Initializes a new instance of the <see cref="EmailServiceManager"/> class. /// </summary> /// <param name="configuration">An instance of <see cref="IConfiguration"/>.</param> /// <param name="repositoryFactory">An instance of <see cref="IRepositoryFactory"/>.</param> /// <param name="cloudStorageClient">An instance of <see cref="ICloudStorageClient"/>.</param> /// <param name="logger">Instance of Logger.</param> /// <param name="notificationProviderFactory">An instance of <see cref="INotificationProviderFactory"/>.</param> /// <param name="emailManager">An instance of <see cref="IEmailManager"/>.</param> public EmailServiceManager( IConfiguration configuration, IRepositoryFactory repositoryFactory, ICloudStorageClient cloudStorageClient, ILogger logger, INotificationProviderFactory notificationProviderFactory, IEmailManager emailManager) { this.repositoryFactory = repositoryFactory; this.configuration = configuration; this.emailNotificationRepository = repositoryFactory.GetRepository(Enum.TryParse <StorageType>(this.configuration?[Constants.StorageType], out this.repo) ? this.repo : throw new Exception()); this.cloudStorageClient = cloudStorageClient; this.logger = logger; this.notificationProvider = notificationProviderFactory.GetNotificationProvider(Enum.TryParse <NotificationProviderType>(this.configuration?[Constants.NotificationProviderType], out this.provider) ? this.provider : throw new Exception()); if (this.configuration?["MailSettings"] != null) { this.mailSettings = JsonConvert.DeserializeObject <List <MailSettings> >(this.configuration?["MailSettings"]); } this.emailManager = emailManager; }
public MailService(IEmailNotificationRepository emailRepository) { this.EmailRepository = emailRepository; }
public BookingController(IBookingRepository bookingRepository, IEmailNotificationRepository emailNotificationRepository, IBlockedDateRepository blockedDateRepository) { this.bookingRepository = bookingRepository; this.emailNotificationRepository = emailNotificationRepository; this.blockedDateRepository = blockedDateRepository; }
public EmailNotificationCrashProcessor(string recepients, IEmailNotificationRepository emailNotificationRepository) { _recepients = recepients; _emailNotificationRepository = emailNotificationRepository; }