private void DoWork(object state) { _logger.Debug("Background timer start"); var path = _configuration["AppSettings:DocumentDirectory"]; _logger.Debug("Indexing path = " + path); _documentManager.BuildIndex(path); _logger.Debug("Background timer end"); }