protected override async Task ExecuteAsync(CancellationToken stoppingToken) { _logger.LogInformation("Watching for changes..."); _directoryWatcher.Created += _directoryWatcher_Created; _directoryWatcher.StartWatching(); while (!stoppingToken.IsCancellationRequested) { _logger.LogInformation("CSVToKafka worker alive."); await Task.Delay(5000, stoppingToken); } }