Example #1
0
        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);
        }
Example #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);
        }
Example #3
0
        public ISnapshotPagination StartPagination(Snapshot snapshot)
        {
            if (_snapshotstore != null)
            {
                _snapshotstore.AddSnapshot(snapshot);
            }
            else
            {
                snapshot.Id = null;
            }

            return(_paginationProvider.StartPagination(snapshot));
        }
Example #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));
        }