public override Expression VisitExpression(Expression expression) { if (expression == null) { return(null); } if (expression.NodeType == ExpressionType.Lambda || !this._partialEvaluationInfo.IsEvaluatableExpression(expression)) { return(base.VisitExpression(expression)); } Expression expressionTree = this.EvaluateSubtree(expression); if (expressionTree != expression) { return(CustomPartialEvaluatingExpressionTreeVisitor.EvaluateIndependentSubtrees(expressionTree)); } else { return(expressionTree); } }
public Expression Process(Expression expressionTree) { ArgumentUtility.CheckNotNull <Expression>("expressionTree", expressionTree); return(CustomPartialEvaluatingExpressionTreeVisitor.EvaluateIndependentSubtrees(expressionTree)); }