Update() public method

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.
public Update ( Expression expression ) : TypeBinaryExpression
expression Expression The property of the result.
return TypeBinaryExpression
示例#1
0
        /// <summary>
        ///     Visits the children of the <see cref="TypeBinaryExpression" />.
        /// </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 VisitTypeBinary(TypeBinaryExpression node)
        {
            if (node == null)
            {
                throw new ArgumentNullException(nameof(node));
            }

            return(node.Update(Visit(node.Expression)));
        }
示例#2
0
        protected override ExpressionTree VisitTypeBinary(TypeBinaryExpression node)
        {
            CheckChildrenCount(1);

            var e = ExtractChildExpression(0);

            var expression = node.Update(e);

            return(CreateExpressionTree(expression));
        }
示例#3
0
 /// <summary>
 /// Visits the children of the <see cref="TypeBinaryExpression"/>.
 /// </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 VisitTypeBinary(TypeBinaryExpression node)
 {
     return(node.Update(Visit(node.Expression)));
 }