Exemplo n.º 1
0
        private static void RunInConsole()
        {
            var settings = new Settings();

            var checker = new FileCheker(settings.Period, settings.SmtpHost, settings.SmtpUser, settings.SmtpPassword, settings.FromEmail, settings.ReportEmail, settings.Files.Cast<string>().ToArray());
            checker.Start();
        }
Exemplo n.º 2
0
        protected override void OnStart(string[] args)
        {
            if (_fileCheker != null)
            {
                return;
            }

            var settings = new Settings();
            settings.Reload();

            _fileCheker = new FileCheker(settings.Period, settings.SmtpHost, settings.SmtpUser, settings.SmtpPassword, settings.FromEmail, settings.ReportEmail, settings.Files.Cast<string>().ToArray());
            _fileCheker.Start();
        }