public virtual SkipTakeClause Clone(CloneContext cloneContext)
        {
            Utils.CheckNotNull("cloneContext", cloneContext);

            var clone = new SkipTakeClause(SkipCount, TakeCount);

            return(clone);
        }
Esempio n. 2
0
        protected override QueryModel ApplyNodeSpecificSemantics(QueryModel queryModel, ClauseGenerationContext clauseGenerationContext)
        {
            Utils.CheckNotNull("queryModel", queryModel);

            var            lastClause     = queryModel.BodyClauses.LastOrDefault();
            SkipTakeClause skipTakeClause = lastClause as SkipTakeClause;

            if (skipTakeClause != null)
            {
                skipTakeClause.SkipCount = Count;
            }
            else
            {
                queryModel.BodyClauses.Add(new SkipTakeClause(Count, null));
            }

            return(queryModel);
        }