public void Start() { if (IsLaunched) { return; } IsLaunched = true; _tokenSource = new CancellationTokenSource(); _watcherTask = _watcher.RunAsync(_tokenSource.Token); UpdateStatus(); }
protected override Task ExecuteAsync(CancellationToken stoppingToken) => _watcher.RunAsync(stoppingToken);