示例#1
0
        /// <summary>
        /// Creates a select operator query 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="source">The <see cref="Source"/> child node of the result.</param>
        /// <param name="selector">The <see cref="Selector"/> child node of the result.</param>
        /// <returns>This query expression if no children are changed or an expression with the updated children.</returns>
        public SelectOperator Update(MonadMember source, QueryTree selector)
        {
            if (source == Source && selector == Selector)
            {
                return(this);
            }

            return(QueryExpressionFactory.Select(ElementType, InputElementType, source, selector));
        }