示例#1
0
        /// <summary>
        /// Creates a new expression that is like this one, but using the supplied children. If all of the children are the same, it will return this expression.
        /// </summary>
        /// <param name="expression">The <see cref="Expression" /> property of the result.</param>
        /// <param name="arguments">The <see cref="Arguments" /> property of the result.</param>
        /// <returns>This expression if no children changed, or an expression with the updated children.</returns>
        public InvocationCSharpExpression Update(Expression expression, IEnumerable <ParameterAssignment> arguments)
        {
            if (expression == Expression && arguments == Arguments)
            {
                return(this);
            }

            return(CSharpExpression.Invoke(expression, arguments));
        }
示例#2
0
 private static InvocationCSharpExpression MakeAccess(ConditionalReceiver receiver, ReadOnlyCollection <ParameterAssignment> arguments)
 {
     return(CSharpExpression.Invoke(receiver, arguments)); // TODO: call ctor directly
 }