Esempio n. 1
0
        public RecentChangeHandler(
            IAppConfiguration appConfig,
            ILogger logger,
            IChannelConfiguration channelConfig,
            IBotUserConfiguration botUserConfiguration,
            IIrcClient freenodeClient,
            IEmailHelper emailHelper,
            INotificationTemplates templates,
            IEmailTemplateFormatter emailTemplateFormatter,
            ISubscriptionHelper subscriptionHelper)
        {
            this.appConfig              = appConfig;
            this.logger                 = logger;
            this.channelConfig          = channelConfig;
            this.botUserConfiguration   = botUserConfiguration;
            this.freenodeClient         = freenodeClient;
            this.emailHelper            = emailHelper;
            this.templates              = templates;
            this.emailTemplateFormatter = emailTemplateFormatter;
            this.subscriptionHelper     = subscriptionHelper;

            if (this.appConfig.EmailConfiguration == null)
            {
                this.logger.Warn("Not sending email; email configuration is disabled");
            }
        }
Esempio n. 2
0
        public EmailTemplateService(IEmailTemplateRepository emailTemplateRepository, IEmailTemplateEditModelFactory emailTemplateEditModelFactory,
                                    IEmailNotificationModelsFactory emailNotificationModelsFactory, IEmailTemplateMacroRepository emailTemplateMacroRepository,
                                    ITemplateMacroRepository templateMacroRepository, INotificationTypeRepository notificationTypeRepository, IEmailTemplateFormatter emailTemplateFormatter,
                                    IPhoneNotificationModelsFactory phoneNotificationModelsFactory)
        {
            _emailTemplateEditModelFactory = emailTemplateEditModelFactory;
            _emailTemplateRepository       = emailTemplateRepository;

            _emailNotificationModelsFactory = emailNotificationModelsFactory;
            _emailTemplateMacroRepository   = emailTemplateMacroRepository;
            _templateMacroRepository        = templateMacroRepository;
            _notificationTypeRepository     = notificationTypeRepository;
            _emailTemplateFormatter         = emailTemplateFormatter;
            _phoneNotificationModelsFactory = phoneNotificationModelsFactory;
        }
Esempio n. 3
0
        public Notifier(INotificationTypeRepository notificationTypeRepository,
                        INotificationSubscriberRepository notificationSubscriberRepository,
                        IEmailTemplateRepository emailTemplateRepository,
                        IEmailTemplateFormatter emailTemplateFormatter,
                        INotificationRepository notificationRepository,
                        INotificationEmailFactory notificationEmailFactory,
                        ISettings settings,
                        IUserRepository <User> userRepository, ICalendar calendar, ITwilioMessagingService twilioMessagingService)
        {
            _notificationTypeRepository       = notificationTypeRepository;
            _notificationSubscriberRepository = notificationSubscriberRepository;
            _emailTemplateRepository          = emailTemplateRepository;
            _emailTemplateFormatter           = emailTemplateFormatter;

            _notificationRepository   = notificationRepository;
            _notificationEmailFactory = notificationEmailFactory;
            _settings               = settings;
            _userRepository         = userRepository;
            _calendar               = calendar;
            _twilioMessagingService = twilioMessagingService;
        }
Esempio n. 4
0
 public StalkCommand(
     string commandSource,
     IUser user,
     IList <string> arguments,
     ILogger logger,
     IFlagService flagService,
     IConfigurationProvider configurationProvider,
     IIrcClient client,
     IChannelConfiguration channelConfiguration,
     IStalkNodeFactory stalkNodeFactory,
     IAppConfiguration config,
     INotificationTemplates templates,
     IEmailHelper emailHelper,
     IXmlCacheService xmlCacheService,
     IBotUserConfiguration botUserConfiguration,
     ISubscriptionHelper subscriptionHelper,
     IIrcClient wikimediaClient,
     IEmailTemplateFormatter emailTemplateFormatter
     ) : base(
         commandSource,
         user,
         arguments,
         logger,
         flagService,
         configurationProvider,
         client)
 {
     this.channelConfiguration = channelConfiguration;
     this.config                 = config;
     this.templates              = templates;
     this.emailHelper            = emailHelper;
     this.xmlCacheService        = xmlCacheService;
     this.botUserConfiguration   = botUserConfiguration;
     this.subscriptionHelper     = subscriptionHelper;
     this.wikimediaClient        = wikimediaClient;
     this.emailTemplateFormatter = emailTemplateFormatter;
     this.stalkNodeFactory       = stalkNodeFactory;
 }
 public PathLookupService(IEmailTemplateFormatter formatter, IChannelConfiguration channelConfiguration, WebConfiguration webConfig)
 {
     this.formatter            = formatter;
     this.channelConfiguration = channelConfiguration;
     this.webConfig            = webConfig;
 }
Esempio n. 6
0
 public void SetUp()
 {
     DependencyRegistrar.RegisterDependencies();
     _emailTemplateFormatter = IoC.Resolve <IEmailTemplateFormatter>();
 }