コード例 #1
0
        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();
        }
コード例 #2
0
 private Task OnLoggerAsync(ILoggerEvent e, CancellationToken token)
 {
     _nonQuietOutput.AddMessage(e.Message, token);
     return(Task.CompletedTask);
 }