Exemplo n.º 1
0
        private RetryableWriteContext CreateContext(bool retryRequested, bool areRetryableWritesSupported, bool hasSessionId, bool isInTransaction)
        {
            var binding = CreateBinding(areRetryableWritesSupported, hasSessionId, isInTransaction);

            return(RetryableWriteContext.Create(binding, retryRequested, CancellationToken.None));
        }
Exemplo n.º 2
0
 private RetryableWriteContext CreateRetryableWriteContext(IReadWriteBindingHandle readWriteBindingHandle, bool async)
 {
     return(async
             ? RetryableWriteContext.CreateAsync(readWriteBindingHandle, retryRequested: false, CancellationToken.None).GetAwaiter().GetResult()
             : RetryableWriteContext.Create(readWriteBindingHandle, retryRequested: false, CancellationToken.None));
 }