コード例 #1
0
        internal override NewExpressionSlim Rewrite(IList <ExpressionSlim> args)
        {
            Debug.Assert(args != null);
            Debug.Assert(args.Count == 2);

            return(ExpressionSlim.New(Constructor, args[0], args[1]));
        }
コード例 #2
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="arguments">The <see cref="Arguments"/> child node of the result.</param>
 /// <returns>This expression if no children are changed or an expression with the updated children.</returns>
 public NewExpressionSlim Update(ReadOnlyCollection <ExpressionSlim> arguments)
 {
     if (Constructor != null && arguments != Arguments)
     {
         return(ExpressionSlim.New(Constructor, arguments, Members));
     }
     else
     {
         return(this);
     }
 }
コード例 #3
0
        internal override NewExpressionSlim Rewrite(IList <ExpressionSlim> args)
        {
            Debug.Assert(args != null);

            return(ExpressionSlim.New(Constructor, args, Members));
        }