예제 #1
0
 public static object GetExactMatch(this IEnumerable <object> source, string itemString, ILookUpContract contract, object sender)
 => source?.FirstOrDefault(i => contract?.IsItemEqualToString(sender, i, itemString) == true);
예제 #2
0
 public static IEnumerable <object> GetSuggestions(this IEnumerable <object> source, string itemString, ILookUpContract contract, object sender)
 => source?.Where(i => contract?.IsItemMatchingSearchString(sender, i, itemString) == true);
예제 #3
0
 public static bool HasAnyExactMatch(this IEnumerable <object> source, string itemString, ILookUpContract contract, object sender)
 => source?.Any(i => contract?.IsItemEqualToString(sender, i, itemString) == true) == true;