NameContainsText() public method

public NameContainsText ( string text ) : bool
text string
return 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;
                }
            }
        }