protected override void ProcessRecord() { base.ProcessRecord(); // TODO: Add overload for IEnumerable var removing = Repository.Select(repo => RepositoryCache.RemoveRepoAsync(repo, CancellationToken)).ToArray(); Task.WaitAll(removing); foreach (var repo in RepositoryCache.GetAllReposAsync(CancellationToken).Result) { WriteObject(repo); } }
protected override void ProcessRecord() { base.ProcessRecord(); try { var repo = RepositoryCache.FindRepoAsync(WorkingDirectory, Token).Result; if (repo != null) { WriteObject(repo); } } catch (OperationCanceledException) { Log.Error("GetGitInfo timedout"); } }