public Task <CompletableSynchronizedStorageSession> TryAdapt(OutboxTransaction transaction, ContextBag context, CancellationToken cancellationToken = default)
 {
     if (transaction is FakeOutboxTransaction inMemOutboxTransaction)
     {
         CompletableSynchronizedStorageSession session = new FakeSynchronizedStorageSession(inMemOutboxTransaction.Transaction);
         return(Task.FromResult(session));
     }
     return(EmptyTask);
 }
 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);
 }