Exemplo n.º 1
0
        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);
        }
Exemplo n.º 2
0
        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);
        }
Exemplo n.º 3
0
 public IEnumerable <Repo> Get([FromServices] IRepoRepository repos)
 {
     //Thread.Sleep(10 * 1000);
     return(repos.GetAll());
 }