Update() 공개 메소드

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 ( LabelTarget target, Expression defaultValue ) : LabelExpression
target LabelTarget The property of the result.
defaultValue Expression The property of the result.
리턴 LabelExpression
예제 #1
0
        /// <summary>
        ///     Visits the children of the <see cref="LabelExpression" />.
        /// </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 VisitLabel(LabelExpression node)
        {
            if (node == null)
            {
                throw new ArgumentNullException(nameof(node));
            }

            return(node.Update(VisitLabelTarget(node.Target), Visit(node.DefaultValue)));
        }
예제 #2
0
 /// <summary>
 /// Visits the children of the <see cref="LabelExpression"/>.
 /// </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 VisitLabel(LabelExpression node)
 {
     return(node.Update(VisitLabelTarget(node.Target), Visit(node.DefaultValue)));
 }