コード例 #1
0
 // public static methods
 public static TResult Execute <TResult>(IRetryableReadOperation <TResult> operation, IReadBinding binding, bool retryRequested, CancellationToken cancellationToken)
 {
     using (var context = RetryableReadContext.Create(binding, retryRequested, cancellationToken))
     {
         return(Execute(operation, context, cancellationToken));
     }
 }
コード例 #2
0
        /// <inheritdoc/>
        public IAsyncCursor <TDocument> Execute(IReadBinding binding, CancellationToken cancellationToken)
        {
            Ensure.IsNotNull(binding, nameof(binding));

            using (var context = RetryableReadContext.Create(binding, retryRequested: false, cancellationToken))
            {
                return(Execute(context, cancellationToken));
            }
        }