/// <summary> /// Takes an expression tree and finds and evaluates all its evaluatable subtrees. /// </summary> public static Expression EvaluateIndependentSubtrees (Expression expressionTree) { ArgumentUtility.CheckNotNull ("expressionTree", expressionTree); var partialEvaluationInfo = EvaluatableTreeFindingExpressionTreeVisitor.Analyze (expressionTree); var visitor = new PartialEvaluatingExpressionTreeVisitor (expressionTree, partialEvaluationInfo); return visitor.VisitExpression (expressionTree); }
/// <summary> /// Takes an expression tree and finds and evaluates all its evaluatable subtrees. /// </summary> public static Expression EvaluateIndependentSubtrees(Expression expressionTree) { ArgumentUtility.CheckNotNull("expressionTree", expressionTree); var partialEvaluationInfo = EvaluatableTreeFindingExpressionTreeVisitor.Analyze(expressionTree); var visitor = new PartialEvaluatingExpressionTreeVisitor(expressionTree, partialEvaluationInfo); return(visitor.VisitExpression(expressionTree)); }