Пример #1
0
        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);
            }
        }
Пример #2
0
        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");
            }
        }