コード例 #1
0
        /// <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="interpolations">The <see cref="Interpolations" /> property of the result.</param>
        /// <returns>This expression if no children changed, or an expression with the updated children.</returns>
        public InterpolatedStringCSharpExpression Update(IEnumerable <Interpolation> interpolations)
        {
            if (interpolations == Interpolations)
            {
                return(this);
            }

            return(CSharpExpression.InterpolatedString(interpolations));
        }