public int Compare(OnlineModViewModel first, OnlineModViewModel second) { // Search score always takes precendence over any other sorting int result = second.SearchScore.CompareTo(first.SearchScore); if (result == 0) { result = SubCompare(first, second); } return(result); }
protected override int SubCompare(OnlineModViewModel first, OnlineModViewModel second) => second.DownloadCount.CompareTo(first.DownloadCount);
protected override int SubCompare(OnlineModViewModel first, OnlineModViewModel second) => first.DisplayName.CompareTo(second.DisplayName);
protected abstract int SubCompare(OnlineModViewModel first, OnlineModViewModel second);