// 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)); } }
/// <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)); } }