/// <summary>
 /// Evaluate all subtrees of an expression that aren't dependent on
 /// parameters to that expression and replace the subtree with a
 /// constant expression.
 /// </summary>
 /// <param name="expression">
 /// The expression to partially evaluate.
 /// </param>
 /// <returns>
 /// An expression in which every node is either a constant or part of
 /// a subtree that depends on a one of the expression's parameters.
 /// </returns>
 public Expression PartiallyEvaluate(Expression expression)
 {
     return(PartialEvaluator.PartiallyEvaluate(expression));
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Evaluate all subtrees of an expression that aren't dependent on
 /// parameters to that expression and replace the subtree with a
 /// constant expression.
 /// </summary>
 /// <param name="expression">
 /// The expression to partially evaluate.
 /// </param>
 /// <returns>
 /// An expression in which every node is either a constant or part of
 /// a subtree that depends on a one of the expression's parameters.
 /// </returns>
 public Expression PartiallyEvaluate(Expression expression)
 => PartialEvaluator.PartiallyEvaluate(expression);