예제 #1
0
        public static List <Expression> Search <TExpression>(Expression expression) where TExpression : Expression
        {
            var searcher = new ExpressionSearcher(e => e is TExpression);

            searcher.Visit(expression);

            return(searcher.nodes.ToList());
        }
예제 #2
0
        public static List <Expression> Search(Expression expression, Func <Expression, bool> criteria, Func <Expression, bool> parentExclusionCriteria = null)
        {
            var searcher = new ExpressionSearcher(criteria, parentExclusionCriteria);

            searcher.Visit(expression);

            return(searcher.nodes.ToList());
        }