Null safety checks.
This commit is contained in:
parent
5f99e594d8
commit
88d3e5ff0c
2 changed files with 45 additions and 28 deletions
|
|
@ -2,6 +2,7 @@
|
|||
using DataLayer;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Linq;
|
||||
|
||||
namespace LibationUiBase.GridView
|
||||
|
|
@ -47,9 +48,11 @@ namespace LibationUiBase.GridView
|
|||
otherSet is not null &&
|
||||
searchSet.Intersect(otherSet).Count() != searchSet.Count);
|
||||
|
||||
public static HashSet<IGridEntry>? FilterEntries(this IEnumerable<IGridEntry> entries, string searchString)
|
||||
[return: NotNullIfNotNull(nameof(searchString))]
|
||||
public static HashSet<IGridEntry>? FilterEntries(this IEnumerable<IGridEntry> entries, string? searchString)
|
||||
{
|
||||
if (string.IsNullOrEmpty(searchString)) return null;
|
||||
if (string.IsNullOrEmpty(searchString))
|
||||
return null;
|
||||
|
||||
var searchResultSet = SearchEngineCommands.Search(searchString);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue