/// <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="object">The <see cref="Object" /> property of the result.</param> /// <param name="initializers">The <see cref="Initializers" /> property of the result.</param> /// <returns>This expression if no children changed, or an expression with the updated children.</returns> public WithCSharpExpression Update(Expression @object, IEnumerable <MemberInitializer> initializers) { if (@object == Object && SameElements(ref initializers, Initializers)) { return(this); } return(Members != null ? CSharpExpression.With(@object, Members, initializers) : CSharpExpression.With(@object, Clone, initializers)); }