コード例 #1
0
        public bool VisitEnter(Composite composite)
        {
            VisitCount++;

            Treenode node = (Treenode)composite;
            if (predicate(node) && node != lastResult) {
                lastResult = result = node;
            }
            return true;
        }
コード例 #2
0
        public bool VisitExit(Composite composite)
        {
            bool val = result == null;

            return val;
        }