示例#1
0
文件: Pager.cs 项目: manjufmcna/spark
        public Snapshot CreateSnapshot(Bundle.BundleType type, Uri link, IEnumerable <string> keys, string sortby, IEnumerable <string> includes = null)
        {
            Snapshot snapshot = Snapshot.Create(type, link, keys, sortby, includes);

            snapshotstore.AddSnapshot(snapshot);
            return(snapshot);
        }
示例#2
0
        /// <summary>
        /// Creates a snapshot for search commands
        /// </summary>
        public Snapshot CreateSnapshot(Bundle.BundleType type, Uri link, IEnumerable <string> keys, string sortby = null, int?count = null, IList <string> includes = null)
        {
            Snapshot snapshot = Snapshot.Create(type, link, keys, sortby, NormalizeCount(count), includes);

            snapshotstore.AddSnapshot(snapshot);
            return(snapshot);
        }
示例#3
0
        public ISnapshotPagination StartPagination(Snapshot snapshot)
        {
            if (_snapshotstore != null)
            {
                _snapshotstore.AddSnapshot(snapshot);
            }
            else
            {
                snapshot.Id = null;
            }

            return(_paginationProvider.StartPagination(snapshot));
        }
示例#4
0
        public async Task <ISnapshotPagination> StartPagination(Snapshot snapshot)
        {
            if (_snapshotstore != null)
            {
                await _snapshotstore.AddSnapshot(snapshot).ConfigureAwait(false);
            }
            else
            {
                snapshot.Id = null;
            }

            return(_paginationProvider.StartPagination(snapshot));
        }