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(); }
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(); }