Simplify and comment

This commit is contained in:
Mbucari 2023-04-10 18:51:11 -06:00
parent 9a663fda15
commit 1939aae81c
3 changed files with 22 additions and 25 deletions

View file

@ -41,6 +41,12 @@ namespace LibationUiBase.GridView
}
}
public static bool SearchSetsDiffer(this HashSet<IGridEntry>? searchSet, HashSet<IGridEntry>? otherSet)
=> searchSet is null != otherSet is null ||
(searchSet is not null &&
otherSet is not null &&
searchSet.Intersect(otherSet).Count() != searchSet.Count);
public static HashSet<IGridEntry>? FilterEntries(this IEnumerable<IGridEntry> entries, string searchString)
{
if (string.IsNullOrEmpty(searchString)) return null;