Rewrite() private method

private Rewrite ( Expression lambda, Expression arguments ) : InvocationExpression
lambda Expression
arguments Expression
return InvocationExpression
Exemplo n.º 1
0
        /// <summary>
        /// Visits the children of the <see cref="InvocationExpression" />.
        /// </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 VisitInvocation(InvocationExpression node)
        {
            Expression e = Visit(node.Expression);
            Expression[] a = VisitArguments(node);
            if (e == node.Expression && a == null)
            {
                return node;
            }

            return node.Rewrite(e, a);
        }
        protected internal virtual Expression VisitInvocation(InvocationExpression node)
        {
            Expression lambda = this.Visit(node.Expression);

            Expression[] arguments = this.VisitArguments(node);
            if ((lambda == node.Expression) && (arguments == null))
            {
                return(node);
            }
            return(node.Rewrite(lambda, arguments));
        }
Exemplo n.º 3
0
        /// <summary>
        ///     Visits the children of the <see cref="InvocationExpression" />.
        /// </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 VisitInvocation(InvocationExpression node)
        {
            if (node == null)
            {
                throw new ArgumentNullException(nameof(node));
            }

            var e = Visit(node.Expression);
            var a = VisitArguments(node);

            if (e == node.Expression && a == null)
            {
                return(node);
            }

            return(node.Rewrite(e, a));
        }