Ejemplo n.º 1
0
        bool IJob.Initialize(IServiceProvider serviceProvider)
        {
            _settings = serviceProvider.GetService<ISettingsServiceInternal>();
            _addressing = serviceProvider.GetService<IAddressingServiceInternal>();

            return true;
        }
Ejemplo n.º 2
0
        bool IJob.Initialize(IServiceProvider serviceProvider)
        {
            _settings   = serviceProvider.GetService <ISettingsServiceInternal>();
            _addressing = serviceProvider.GetService <IAddressingServiceInternal>();

            return(true);
        }
Ejemplo n.º 3
0
        bool IJob.Initialize(IServiceProvider serviceProvider)
        {
            _settings = serviceProvider.GetService<ISettingsServiceInternal>();
            _addressing = serviceProvider.GetService<IAddressingServiceInternal>();

            _expression = _settings.GetSetting("PushJob", "MessageContent").GetValue<string>();
            return true;
        }
Ejemplo n.º 4
0
        bool IJob.Initialize(IServiceProvider serviceProvider)
        {
            _settings   = serviceProvider.GetService <ISettingsServiceInternal>();
            _addressing = serviceProvider.GetService <IAddressingServiceInternal>();

            _expression = _settings.GetSetting("PushJob", "MessageContent").GetValue <string>();
            return(true);
        }
Ejemplo n.º 5
0
        bool IJob.Initialize(IServiceProvider serviceProvider)
        {
            _settings   = serviceProvider.GetService <ISettingsServiceInternal>();
            _addressing = serviceProvider.GetService <IAddressingServiceInternal>();

            _provider = ExportedTypeLibrary.Import <ISmsProvider>(_settings.GetSetting(SettingKeys.Provider).GetValue <string>());

            return(true);
        }
Ejemplo n.º 6
0
        bool IJob.Initialize(IServiceProvider serviceProvider)
        {
            _settings   = serviceProvider.GetService <ISettingsServiceInternal>();
            _addressing = serviceProvider.GetService <IAddressingServiceInternal>();

            _userName = _settings.GetSetting("SMSJob", "UserName").GetValue <string>();
            _password = _settings.GetSetting("SMSJob", "Password").GetValue <string>();
            _provider = ExportedTypeLibrary.Import <ISmsProvider>(_settings.GetSetting("SMSJob", "Provider").GetValue <string>());

            return(true);
        }
Ejemplo n.º 7
0
        bool IJob.Initialize(IServiceProvider serviceProvider)
        {
            _settings = serviceProvider.GetService<ISettingsServiceInternal>();
            _addressing = serviceProvider.GetService<IAddressingServiceInternal>();

            string smtpHostName = _settings.GetSetting("MailingJob", "HostName").GetValue<string>();
            string userName = _settings.GetSetting("MailingJob", "UserName").GetValue<string>();
            string userPassword = _settings.GetSetting("MailingJob", "Password").GetValue<string>();
            int smtpPort = _settings.GetSetting("MailingJob", "Port").GetValue<int>();
            bool smtpAuthenticate = _settings.GetSetting("MailingJob", "Authenticate").GetValue<bool>();
            bool useSsl = _settings.GetSetting("MailingJob", "UseSsl").GetValue<bool>();

            _senderEmail = Helpers.ParseAddress(_settings.GetSetting("MailingJob", "SenderAddress").GetValue<string>());
            if (_senderEmail == null)
            {
                Logger.Instance.LogFormat(LogType.Warning, this, Properties.Resources.NoSenderAddressMessage);
                return false;
            }

            _smptClient = new SmtpClient(smtpHostName, smtpPort);
            _smptClient.EnableSsl = useSsl;
            if (smtpAuthenticate)
            {
                _smptClient.Credentials = new NetworkCredential(userName, userPassword);
            }

            _mailBodyFormat = _settings.GetSetting("MailingJob", "EMailBody").GetValue<string>();
            _mailSubject = _settings.GetSetting("MailingJob", "EMailSubject").GetValue<string>();
            if (string.IsNullOrWhiteSpace(_mailSubject))
            {
                _mailSubject = _settings.GetSetting("Shared", "FD.Name").GetValue<string>() + " - Neuer Alarm";
            }

            _attachImage = _settings.GetSetting("MailingJob", "AttachImage").GetValue<bool>();

            return true;
        }
Ejemplo n.º 8
0
        bool IJob.Initialize(IServiceProvider serviceProvider)
        {
            _settings   = serviceProvider.GetService <ISettingsServiceInternal>();
            _addressing = serviceProvider.GetService <IAddressingServiceInternal>();

            string smtpHostName     = _settings.GetSetting("MailingJob", "HostName").GetValue <string>();
            string userName         = _settings.GetSetting("MailingJob", "UserName").GetValue <string>();
            string userPassword     = _settings.GetSetting("MailingJob", "Password").GetValue <string>();
            int    smtpPort         = _settings.GetSetting("MailingJob", "Port").GetValue <int>();
            bool   smtpAuthenticate = _settings.GetSetting("MailingJob", "Authenticate").GetValue <bool>();
            bool   useSsl           = _settings.GetSetting("MailingJob", "UseSsl").GetValue <bool>();

            _senderEmail = Helpers.ParseAddress(_settings.GetSetting("MailingJob", "SenderAddress").GetValue <string>());
            if (_senderEmail == null)
            {
                Logger.Instance.LogFormat(LogType.Warning, this, Properties.Resources.NoSenderAddressMessage);
                return(false);
            }

            _smptClient           = new SmtpClient(smtpHostName, smtpPort);
            _smptClient.EnableSsl = useSsl;
            if (smtpAuthenticate)
            {
                _smptClient.Credentials = new NetworkCredential(userName, userPassword);
            }

            _mailBodyFormat = _settings.GetSetting("MailingJob", "EMailBody").GetValue <string>();
            _mailSubject    = _settings.GetSetting("MailingJob", "EMailSubject").GetValue <string>();
            if (string.IsNullOrWhiteSpace(_mailSubject))
            {
                _mailSubject = _settings.GetSetting("Shared", "FD.Name").GetValue <string>() + " - Neuer Alarm";
            }

            _attachImage = _settings.GetSetting("MailingJob", "AttachImage").GetValue <bool>();

            return(true);
        }
Ejemplo n.º 9
0
        bool IJob.Initialize(IServiceProvider serviceProvider)
        {
            _settings = serviceProvider.GetService<ISettingsServiceInternal>();
            _addressing = serviceProvider.GetService<IAddressingServiceInternal>();

            _userName = _settings.GetSetting("SMSJob", "UserName").GetValue<string>();
            _password = _settings.GetSetting("SMSJob", "Password").GetValue<string>();
            _provider = ExportedTypeLibrary.Import<ISmsProvider>(_settings.GetSetting("SMSJob", "Provider").GetValue<string>());

            return true;
        }
Ejemplo n.º 10
0
        bool IJob.Initialize(IServiceProvider serviceProvider)
        {
            _settings = serviceProvider.GetService<ISettingsServiceInternal>();
            _addressing = serviceProvider.GetService<IAddressingServiceInternal>();

            _provider = ExportedTypeLibrary.Import<ISmsProvider>(_settings.GetSetting(SettingKeys.Provider).GetValue<string>());

            return true;
        }