public RavenPageBookmark(IPageBookmark other)
 {
     PageSize           = other.PageSize;
     CurrentPage        = other.CurrentPage;
     LastSkippedResults = other.LastSkippedResults;
     Statistics         = null;
 }
 public GenericPageBookmark(IPageBookmark pbm)
 {
     PageSize           = pbm.PageSize;
     CurrentPage        = pbm.CurrentPage;
     LastSkippedResults = pbm.LastSkippedResults;
     TotalResults       = pbm.TotalResults;
     More = pbm.More;
 }
示例#3
0
        public void EndSpooling(IPageBookmark continuation)
        {
            Debug.Assert(IsInitialized);
            Debug.Assert(IsStarted);

            _tracking.PageBookmark = continuation;
            _tracking.Completed    = true;
            _spoolTrackingData.Save(_spoolId, _tracking, _lifeTime);
            _pageData.Save("complete", new TData[] {}, _lifeTime);
        }
 public static IQueryable <T> Page <T>(this IQueryable <T> that, IPageBookmark bm)
 {
     if (bm.CurrentPage > 0)
     {
         return
             (that
              .Skip((bm.CurrentPage * bm.PageSize) + bm.LastSkippedResults)
              .Take(bm.PageSize));
     }
     else
     {
         return
             (that
              .Take(bm.PageSize));
     }
 }
        public static IEnumerable <T> PageAll <T>(IQueryable <T> that, IPageBookmark bm)
        {
            var data = Enumerable.Empty <T>();

            do
            {
                var moreData = Page(that, bm).AsEnumerable();
                if (moreData.Any())
                {
                    data = data.Concat(moreData);
                }
                bm.Forward();
                bm.More = moreData.Any();
            } while (bm.More);

            return(data);
        }
        public TSummaryPackageType NamedQuery(string registrationName, string[] arguments, IPageBookmark bookMark)
        {
            var qh =
                Catalog.Factory.Resolve
                <IRegisteredQueryHandler <TSummaryType, TSummaryPackageType, TSummaryMetadataType> >(
                    registrationName);

            return(qh.ExecuteQuery(arguments, bookMark));
        }
 public void EndSpooling(IPageBookmark bookmark)
 {
     throw new NotImplementedException();
 }
示例#8
0
 public void EndSpooling(IPageBookmark bookmark)
 {
     Contract.Requires(null != bookmark);
 }