private void OnAddFolderTimerEvent(object sender, ElapsedEventArgs e) { // only add another watched folder if we still have iterations. --_iterations; if (_iterations <= 0) { Stop(); _nonQuietOutput.AddMessage("All done!", CancellationToken.None); return; } // add another watcher var newWatchedFolder = AddWatchedFolder(); newWatchedFolder.Start(); }
private Task OnLoggerAsync(ILoggerEvent e, CancellationToken token) { _nonQuietOutput.AddMessage(e.Message, token); return(Task.CompletedTask); }