/// <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);
    }
Exemple #2
0
        /// <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));
        }