예제 #1
0
        public void SortCommand(object eventDictionary)
        {
            Dictionary <string, ListSortDirection> changed = eventDictionary as Dictionary <string, ListSortDirection>;

            NotifyTaskCompletion.Create <IEnumerable <T> >(_dataProvider.GetSortedCollectionPagedAsync(changed, 1, _defaultPage), (task, ev) =>
            {
                OnNotifyIncrementalListSorted(task, changed);
            });
        }
예제 #2
0
 private void LoadMoreSortedItems(uint count, int baseIndex)
 {
     NotifyTaskCompletion.Create <IEnumerable <T> >(
         _dataProvider.GetSortedCollectionPagedAsync(_sortDictionary, baseIndex, _defaultPage), (task, ev) => {
         if (task is INotifyTaskCompletion <IEnumerable <T> > taskResult)
         {
             if (taskResult.IsSuccessfullyCompleted)
             {
                 OnNewPage?.Invoke(taskResult.Task.Result);
             }
             else
             {
                 _dialogService.ShowErrorMessage("Cannot load sorted items");
             }
         }
     });
 }