Exemple #1
0
 protected override void OnStart(string[] args)
 {
     Config();
     watcher = new Watcher(movingOptions, watcherOptions, archiveOptions, optionsManager.Report);
     watcher.Start();
     logger.Log("Service started...");
 }
Exemple #2
0
        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();
        }
Exemple #3
0
 protected override void OnStart(string[] args)
 {
     watcher = new Watcher(source, target);
     watcher.Start();
 }