示例#1
0
        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);
        }
示例#2
0
 protected override int SubCompare(OnlineModViewModel first, OnlineModViewModel second)
 => second.DownloadCount.CompareTo(first.DownloadCount);
示例#3
0
 protected override int SubCompare(OnlineModViewModel first, OnlineModViewModel second)
 => first.DisplayName.CompareTo(second.DisplayName);
示例#4
0
 protected abstract int SubCompare(OnlineModViewModel first, OnlineModViewModel second);