コード例 #1
0
 public void DeleteIssues(ValidateRowDeletionArgs args)
 {
     foreach (IssueData item in args.Items)
     {
         IssuesService.DeleteRowAsync(item).Wait();
     }
 }
コード例 #2
0
        async Task <FetchRowsResult> GetIssuesAsync(FetchRowsAsyncArgs args)
        {
            var take   = args.Take ?? 30;
            var issues = await IssuesService.GetIssuesAsync(
                skip : args.Skip,
                take : take,
                sortOrder : GetIssueSortOrder(args.SortOrder),
                filter : (IssueFilter)args.Filter);

            return(new FetchRowsResult(issues, hasMoreRows: issues.Length == take));
        }
コード例 #3
0
        static async Task <object[]> GetTotalSummariesAsync(GetSummariesAsyncArgs e)
        {
            var summaryValues = await IssuesService.GetSummariesAsync((IssueFilter)e.Filter);

            return(e.Summaries.Select(x => {
                if (x.SummaryType == SummaryType.Count)
                {
                    return (object)summaryValues.Count;
                }
                if (x.SummaryType == SummaryType.Max && x.PropertyName == "Created")
                {
                    return summaryValues.LastCreated;
                }
                throw new InvalidOperationException();
            }).ToArray());
        }
コード例 #4
0
 async void AssignUsers()
 {
     Users = await IssuesService.GetUsersAsync();
 }
コード例 #5
0
        static async Task <ValidationErrorInfo> AddNewIssueAsync(IssueData issue)
        {
            await IssuesService.AddNewRowAsync(issue);

            return(null);
        }
コード例 #6
0
        static async Task <ValidationErrorInfo> UpdateIssueAsync(IssueData issue)
        {
            await IssuesService.UpdateRowAsync(issue);

            return(null);
        }