public HierarchyCheck Child <U>(string caption) where U : HierarchyNode { var check = new HierarchyCheck(caption, typeof(U), null); check.parent = this; children.Add(check); return(check); }
public HierarchyCheck Child <U>(string caption, params Action <U>[] ac) where U : HierarchyNode { Action <U> combined = (Action <U>) Action <U> .Combine(ac); var check = new HierarchyCheck(caption, typeof(U), n => combined((U)n)); check.parent = this; children.Add(check); return(check); }
public void Run() { HierarchyCheck current = this; while (current.parent != null) { current = current.parent; } current.Run(current.root); }
private string PrettyPrintNode(HierarchyCheck arg) { return(String.Format("<{0} ({1})>", arg.caption, arg.type)); }