예제 #1
0
        /// <summary>
        /// Creates a where 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="predicate">The <see cref="Predicate"/> child node of the result.</param>
        /// <returns>This query expression if no children are changed or an expression with the updated children.</returns>
        public WhereOperator Update(MonadMember source, QueryTree predicate)
        {
            if (source == Source && predicate == Predicate)
            {
                return(this);
            }

            return(QueryExpressionFactory.Where(ElementType, source, predicate));
        }