public bool SortSelectionChanged(IVsSortDescriptor selectedDescriptor) { Provider.CurrentSort = selectedDescriptor as PackageSortDescriptor; if (Provider.CurrentSort != null) { // If we changed the sort order then invalidate the cache. ResetQuery(); // Reload the first page since the sort order changed LoadPage(1); return true; } return false; }
public bool SortSelectionChanged(IVsSortDescriptor selectedDescriptor) { Provider.CurrentSort = selectedDescriptor as PackageSortDescriptor; // The value of CurrentSort could be null if we're dealing with the SearchProvider. Use the selectedDescriptor instead since it returns the actual instance. if (selectedDescriptor != null) { // If we changed the sort order then invalidate the cache. ResetQuery(); // Reload the first page since the sort order changed LoadPage(1); return(true); } return(false); }