static void Main() { var configurationFilePath = Path.Combine(ExecutingAssemblyFolder, ConfigurationManager.AppSettings["FolderPollConfigurationFileName"]); folderPollService = new FolderPollService(configurationFilePath, true); folderPollService.Run(); System.Console.WriteLine("FolderPoll service started! Please press any key to stop service"); System.Console.ReadKey(false); folderPollService.Stop(); }
public FolderPollWindowsService() { InitializeComponent(); string configurationFilePath = Path.Combine(this.ExecutingAssemblyFolder, ConfigurationManager.AppSettings["FolderPollConfigurationFileName"]); this.folderPollService = new FolderPollService(configurationFilePath, true); }