コード例 #1
0
ファイル: TakeOperator.cs プロジェクト: tamirdresher/reaqtor
        /// <summary>
        /// Creates a take 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="count">The <see cref="Count"/> child node of the result.</param>
        /// <returns>This query expression if no children are changed or an expression with the updated children.</returns>
        public TakeOperator Update(MonadMember source, QueryTree count)
        {
            if (source == Source && count == Count)
            {
                return(this);
            }

            return(QueryExpressionFactory.Take(ElementType, source, count));
        }