public IList <Repo> Search(string searchString) { IList <Repo> repos = new List <Repo>(); repos = _repoService.GetAll().Where(r => r.full_name.ToUpper().Contains(searchString.ToUpper())).ToList(); if (repos.Count == 0) { throw new RepoNotFoundException("I'm so sorry. Nothing found here (own)"); } return(repos); }
public async Task <List <PullRequest> > GetAll(string state) { var repositories = await _repoRepository.GetAll(); var allPullRequests = new List <PullRequest>(); foreach (var repository in repositories) { var pullRequests = await _pullRequestRepository.Get(repository, state); if (pullRequests != null) { allPullRequests.AddRange(pullRequests); } } return(allPullRequests); }
public IEnumerable <Repo> Get([FromServices] IRepoRepository repos) { //Thread.Sleep(10 * 1000); return(repos.GetAll()); }