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); }); }
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"); } } }); }