public NameContainsText ( string text ) : bool | ||
text | string | |
Результат | bool |
private IEnumerable <GridItemViewModel> FindMatches(string text, GridItemViewModel item) { if (item == null) { yield return(null); } if (item.NameContainsText(text)) { yield return(item); } foreach (GridItemViewModel child in item.Children) { foreach (GridItemViewModel match in FindMatches(text, child)) { yield return(match); } } }
private IEnumerable<GridItemViewModel> FindMatches(string text, GridItemViewModel item) { if (item == null) { yield return null; } if (item.NameContainsText(text)) { yield return item; } foreach (GridItemViewModel child in item.Children) { foreach (GridItemViewModel match in FindMatches(text, child)) { yield return match; } } }