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;
 }
 public void Dispose()
 {
     Transaction = null;
 }
 public FakeOutboxTransaction()
 {
     Transaction = new FakeTransaction();
 }
Exemple #5
0
 public FakeSynchronizedStorageSession(FakeTransaction transaction)
 {
     Transaction = transaction;
 }