protected override void OnStart(string[] args) { Config(); watcher = new Watcher(movingOptions, watcherOptions, archiveOptions, optionsManager.Report); watcher.Start(); logger.Log("Service started..."); }
protected override void OnStart(string[] args) { Configuration config; try { ConfigurationProvider provider = new ConfigurationProvider(path1); config = provider.GetConfiguration(); } catch { config = new Configuration(); } watcher = new Watcher(config.sourcePath, config.targetPath, config.needArchive); watcher.Start(); }
protected override void OnStart(string[] args) { watcher = new Watcher(source, target); watcher.Start(); }