/// <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="operand">The <see cref="Operand" /> property of the result.</param> /// <param name="elementConversions">The <see cref="ElementConversions" /> property of the result.</param> /// <returns>This expression if no children changed, or an expression with the updated children.</returns> public TupleConvertCSharpExpression Update(Expression operand, IEnumerable <LambdaExpression> elementConversions) { if (operand == Operand && SameElements(ref elementConversions, ElementConversions)) { return(this); } return(CSharpExpression.TupleConvert(operand, Type, elementConversions)); }
/// <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="operand">The <see cref="Operand" /> property of the result.</param> /// <param name="elementConversions">The <see cref="ElementConversions" /> property of the result.</param> /// <returns>This expression if no children changed, or an expression with the updated children.</returns> public TupleConvertCSharpExpression Update(Expression operand, IEnumerable<LambdaExpression> elementConversions) { if (operand == this.Operand && elementConversions == this.ElementConversions) { return this; } return CSharpExpression.TupleConvert(operand, Type, elementConversions); }