Ejemplo n.º 1
0
        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);
        }
Ejemplo n.º 2
0
        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);
        }
Ejemplo n.º 3
0
        public void Run()
        {
            HierarchyCheck current = this;

            while (current.parent != null)
            {
                current = current.parent;
            }
            current.Run(current.root);
        }
Ejemplo n.º 4
0
 private string PrettyPrintNode(HierarchyCheck arg)
 {
     return(String.Format("<{0} ({1})>", arg.caption, arg.type));
 }