コード例 #1
0
 private HttpResponseMessage CreateGithubIssuesFromQuery(GithubIssueQuery issueQuery, int currentpageIndex, List<GithubIssue> issues)
 {
     var requestUri = _requestBuilder.BuildRequestUri(issueQuery, currentpageIndex);
     var result = _httpClient.GetAsync(requestUri).Result;
     issues.AddRange(ConvertToGithubIssues(result));
     return result;
 }
コード例 #2
0
 public virtual IEnumerable<GithubIssue> GetIssues(GithubIssueQuery issueQuery)
 {
     int currentpageIndex = 1;
     var issues = new List<GithubIssue>();
     var result = CreateGithubIssuesFromQuery(issueQuery, currentpageIndex, issues);
     var lastPageIndex = _httpResponseHelper.GetLastPageIndex(result);
     for (currentpageIndex = 2; currentpageIndex <= lastPageIndex; currentpageIndex++)
     {
         CreateGithubIssuesFromQuery(issueQuery, currentpageIndex, issues);
     }
     return issues;
 }