private static List <MatchResult> Score(string title, string filterText) { var startsWithMatcher = new StartsWithMatcher(); var containsMatcher = new ContainsMatcher(); var significantCharactersMatcher = new SignificantCharactersMatcher(); var individualCharactersMatcher = new IndividualCharactersMatcher(); var results = new List <MatchResult> { startsWithMatcher.Evaluate(title, filterText), significantCharactersMatcher.Evaluate(title, filterText), containsMatcher.Evaluate(title, filterText), individualCharactersMatcher.Evaluate(title, filterText) }; return(results); }
private static MatchResult Evaluate(string input, string pattern) { var containsMatcher = new ContainsMatcher(); return(containsMatcher.Evaluate(input, pattern)); }