public static async Task <TResult> ExecuteAsync <TResult>(IRetryableReadOperation <TResult> operation, IReadBinding binding, bool retryRequested, CancellationToken cancellationToken)
 {
     using (var context = await RetryableReadContext.CreateAsync(binding, retryRequested, cancellationToken).ConfigureAwait(false))
     {
         return(await ExecuteAsync(operation, context, cancellationToken).ConfigureAwait(false));
     }
 }
Esempio n. 2
0
        /// <inheritdoc/>
        public async Task <IAsyncCursor <TDocument> > ExecuteAsync(IReadBinding binding, CancellationToken cancellationToken)
        {
            Ensure.IsNotNull(binding, nameof(binding));

            using (var context = await RetryableReadContext.CreateAsync(binding, retryRequested: false, cancellationToken).ConfigureAwait(false))
            {
                return(await ExecuteAsync(context, cancellationToken).ConfigureAwait(false));
            }
        }