public Task <ICompletableSynchronizedStorageSession> TryAdapt(TransportTransaction transportTransaction, ContextBag context, CancellationToken cancellationToken = default)
 {
     if (transportTransaction.TryGet(out Transaction ambientTransaction))
     {
         var transaction = new NonDurableTransaction();
         ICompletableSynchronizedStorageSession session = new NonDurableSynchronizedStorageSession(transaction);
         ambientTransaction.EnlistVolatile(new EnlistmentNotification2(transaction), EnlistmentOptions.None);
         return(Task.FromResult(session));
     }
     return(EmptyTask);
 }
Пример #2
0
 public NonDurableOutboxTransaction()
 {
     Transaction = new NonDurableTransaction();
 }
Пример #3
0
 public void Dispose()
 {
     Transaction = null;
 }
Пример #4
0
 public NonDurableSynchronizedStorageSession(NonDurableTransaction transaction)
 {
     Transaction = transaction;
 }
 public EnlistmentNotification2(NonDurableTransaction transaction)
 {
     this.transaction = transaction;
 }