System.Linq.Expressions.MemberInitExpression.Update C# (CSharp) Méthode

Update() public méthode

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 ( NewExpression newExpression, IEnumerable bindings ) : MemberInitExpression
newExpression NewExpression The property of the result.
bindings IEnumerable The property of the result.
Résultat MemberInitExpression
        public MemberInitExpression Update(NewExpression newExpression, IEnumerable<MemberBinding> bindings)
        {
            if (newExpression == NewExpression && bindings == Bindings)
            {
                return this;
            }
            return Expression.MemberInit(newExpression, bindings);
        }
    }

Usage Example

Exemple #1
0
 /// <summary>
 /// Visits the children of the <see cref="MemberInitExpression"/>.
 /// </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 VisitMemberInit(MemberInitExpression node)
 {
     return(node.Update(
                VisitAndConvert(node.NewExpression, nameof(VisitMemberInit)),
                Visit(node.Bindings, VisitMemberBinding)
                ));
 }
All Usage Examples Of System.Linq.Expressions.MemberInitExpression::Update