public async Task <IEnumerable <ICommit> > GetFromToAsync(string bucketId, DateTime start, DateTime end, CancellationToken cancellationToken)
 {
     return(await ExecuteHooks(
                await _original
                .GetFromToAsync(bucketId, start, end, cancellationToken)
                .ConfigureAwait(false),
                cancellationToken).ConfigureAwait(false));
 }
コード例 #2
0
        /// <summary>
        /// Gets all commits on or after from the specified starting time and before the specified end time from the default bucket.
        /// </summary>
        /// <param name="persistStreams">The IPersistStreams instance.</param>
        /// <param name="start">The point in time at which to start.</param>
        /// <param name="end">The point in time at which to end.</param>
        /// <param name="cancellationToken">The cancellation token.</param>
        /// <returns>All commits that have occurred on or after the specified starting time and before the end time.</returns>
        /// <exception cref="StorageException" />
        /// <exception cref="StorageUnavailableException" />
        public static Task <IEnumerable <ICommit> > GetFromToAsync(this IPersistStreams persistStreams, DateTime start, DateTime end, CancellationToken cancellationToken)
        {
            if (persistStreams == null)
            {
                throw new ArgumentNullException(nameof(persistStreams));
            }

            return(persistStreams.GetFromToAsync(Bucket.Default, start, end, cancellationToken));
        }
 public Task <IEnumerable <ICommit> > GetFromToAsync(string bucketId, DateTime start, DateTime end, CancellationToken cancellationToken)
 {
     return(_persistence.GetFromToAsync(bucketId, start, end, cancellationToken));
 }