예제 #1
0
        internal static HashSet <Expression> Select(Expression e, Func <Expression, bool> predicate)
        {
            var visitor = new BranchSelectExpressionVisitor(predicate);

            visitor.Visit(e);

            return(visitor.matches);
        }
예제 #2
0
        public static Expression Evaluate(Expression e)
        {
            var chosenForEvaluation = BranchSelectExpressionVisitor.Select(e, ShouldEvaluate);

            return(EvaluatingExpressionVisitor.Evaluate(e, chosenForEvaluation));
        }