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