public static void Main() { var service = new CheckerService(new Configuration(), new FileSystemService(new Configuration())); #if DEBUG service.InitialFolderCheck(); service.StartFolderWatcher(); #else var servicesToRun = new ServiceBase[] { new NotFoundImageCheckerService(service) }; ServiceBase.Run(servicesToRun); #endif Console.ReadLine(); }
protected override void OnStart(string[] args) { base.OnStart(args); service.InitialFolderCheck(); }