public int Compare(ItemMatch <T> x, ItemMatch <T> y)
        {
            float mx = x.MatchStrength;
            float my = y.MatchStrength;

            if (mx < my)
            {
                return(+1);
            }
            else if (mx > my)
            {
                return(-1);
            }
            else
            {
                return(0);
            }
        }
Exemple #2
0
 public int Compare(ItemMatch <T>?x, ItemMatch <T>?y)
 {
     return(0);
 }
Exemple #3
0
        public static SearchResult <T> FromSingleItem(string term, Locale locale, Version version, T item)
        {
            var match = new ItemMatch <T>(term, 1f, item, 1f, 1f);

            return(new SearchResult <T>(term, locale, version, new[] { match }));
        }