/// <summary> /// Visits the children of the <see cref="MethodCallExpression" />. /// </summary> /// <param name="node">The expression to visit.</param> /// <returns>The modified expression, if it or any subexpression was modified; /// otherwise, returns the original expression.</returns> protected internal virtual Expression VisitMethodCall(MethodCallExpression node) { Expression o = Visit(node.Object); Expression[] a = VisitArguments(node); if (o == node.Object && a == null) { return node; } return node.Rewrite(o, a); }
protected internal virtual Expression VisitMethodCall(MethodCallExpression node) { Expression instance = this.Visit(node.Object); Expression[] args = this.VisitArguments(node); if ((instance == node.Object) && (args == null)) { return(node); } return(node.Rewrite(instance, args)); }
/// <summary> /// Visits the children of the <see cref="MethodCallExpression" />. /// </summary> /// <param name="node">The expression to visit.</param> /// <returns> /// The modified expression, if it or any subexpression was modified; /// otherwise, returns the original expression. /// </returns> protected internal virtual Expression VisitMethodCall(MethodCallExpression node) { if (node == null) { throw new ArgumentNullException(nameof(node)); } var o = Visit(node.Object); var a = VisitArguments(node); if (o == node.Object && a == null) { return(node); } return(node.Rewrite(o, a)); }