Beispiel #1
0
        public bool Contains(string searchKeyword)
        {
            string lowerSearchKeyword = searchKeyword.ToLower();

            return(Description.ToLower().Contains(lowerSearchKeyword) ||
                   WhenList.Any(when => when.ToLower().Contains(lowerSearchKeyword)) ||
                   ThenList.Any(then => then.Description.ToLower().Contains(lowerSearchKeyword)) ||
                   Children.Any(child => child.Contains(lowerSearchKeyword)));
        }
Beispiel #2
0
 public bool IsEmpty()
 {
     return(!WhenList.Any() && !ThenList.Any() && Children.All(c => c.IsEmpty()));
 }