예제 #1
0
        public async Task <PaginatedList <WorkItemViewModel> > GetFailedAsync(
            PagingParameters pagingParameters
            )
        {
            var count = await this.repository
                        .CountAsync(new WorkItemRetryLimitHitCount(WorkItem.WORKITEM_RETRIES));

            var items = await this.repository
                        .ListAsync(new WorkItemRetryLimitHitCountOrderedPaginated(
                                       WorkItem.WORKITEM_RETRIES,
                                       pagingParameters.SkipCount,
                                       pagingParameters.PageSize
                                       ));

            return(new PaginatedList <WorkItemViewModel>(
                       ViewModelMapper.ToWorkItemViewModelList(items),
                       count,
                       pagingParameters.PageIndex,
                       pagingParameters.PageSize
                       ));
        }
예제 #2
0
        public async Task <PaginatedList <WorkItemViewModel> > GetUpCommingsAsync(
            PagingParameters pagingParameters
            )
        {
            var now = SystemTime.Now();

            var count = await this.repository
                        .CountAsync(new WorkItemDueDateGreaterThanNowCount(now));

            var items = await this.repository
                        .ListAsync(new WorkItemDueDateGreaterThanNowOrderedPaginated(
                                       now,
                                       pagingParameters.SkipCount,
                                       pagingParameters.PageSize
                                       ));

            return(new PaginatedList <WorkItemViewModel>(
                       ViewModelMapper.ToWorkItemViewModelList(items),
                       count,
                       pagingParameters.PageIndex,
                       pagingParameters.PageSize
                       ));
        }
예제 #3
0
 public IEnumerable <WorkItemViewModel> GetSnapshot()
 {
     return(ViewModelMapper.ToWorkItemViewModelList(this.Items.ToArray()));
 }