protected override void OnStart(string[] args)
        {
            _logger.Info("Filewatcher Service is starting");
            try
            {
                _fileWatcher = new SystemFileMonitor();

                _fileWatcher.Start();
            }
            catch (Exception e)
            {
                _logger.ErrorFormat("Failed to start service Exception {0}", e);
                throw;
            }
        }
Exemplo n.º 2
0
        private static void Start()
        {
            _fileWatcher = new SystemFileMonitor();

            _fileWatcher.Start();
        }