Ejemplo n.º 1
0
        async Task <object[]> GetTotalSummariesAsync(GetSummariesAsyncEventArgs e)
        {
            IssueFilter filter        = IssuesHelper.MakeIssueFilter(e.Filter);
            var         summaryValues = await IssuesService.GetSummariesAsync(filter);

            return(e.Summaries.Select(x => {
                if (x.SummaryType == SummaryType.Count)
                {
                    return (object)summaryValues.Count;
                }
                throw new InvalidOperationException();
            }).ToArray());
        }
Ejemplo n.º 2
0
        async Task <FetchRowsResult> FetchRowsAsync(FetchRowsAsyncEventArgs e)
        {
            IssueSortOrder sortOrder = IssuesHelper.GetIssueSortOrder(e);
            IssueFilter    filter    = IssuesHelper.MakeIssueFilter(e.Filter);
            const int      pageSize  = 30;
            var            issues    = await IssuesService.GetIssuesAsync(
                page : e.Skip / pageSize,
                pageSize : pageSize,
                sortOrder : sortOrder,
                filter : filter);

            return(new FetchRowsResult(issues, hasMoreRows: issues.Length == pageSize));
        }