public List <ParseNodeDrawable> Satisfy(ParseTreeSearchable tree) { List <ParseNodeDrawable> result = new List <ParseNodeDrawable>(); if (Satisfy((ParseNodeSearchable)tree.GetRoot())) { result.Add(this); } foreach (var child in children) { result = result.Union(((ParseNodeDrawable)child).Satisfy(tree)).ToList(); } return(result); }
public List <ParseNodeDrawable> Satisfy(ParseTreeSearchable tree) { return(((ParseNodeDrawable)root).Satisfy(tree)); }