public Task <CompletableSynchronizedStorageSession> TryAdapt(TransportTransaction transportTransaction, ContextBag context)
 {
     if (transportTransaction.TryGet(out Transaction ambientTransaction))
     {
         var transaction = new InMemoryTransaction();
         CompletableSynchronizedStorageSession session = new InMemorySynchronizedStorageSession(transaction);
         ambientTransaction.EnlistVolatile(new EnlistmentNotification(transaction), EnlistmentOptions.None);
         return(Task.FromResult(session));
     }
     return(EmptyTask);
 }
        public Task<CompletableSynchronizedStorageSession> TryAdapt(TransportTransaction transportTransaction, ContextBag context)
        {
            Transaction ambientTransaction;

            if (transportTransaction.TryGet(out ambientTransaction))
            {
                var transaction = new InMemoryTransaction();
                CompletableSynchronizedStorageSession session = new InMemorySynchronizedStorageSession(transaction);
                ambientTransaction.EnlistVolatile(new EnlistmentNotification(transaction), EnlistmentOptions.None);
                return Task.FromResult(session);
            }
            return EmptyTask;
        }
 public void Dispose()
 {
     Transaction = null;
 }
 public InMemoryOutboxTransaction()
 {
     Transaction = new InMemoryTransaction();
 }
 public void Dispose()
 {
     Transaction = null;
 }
 public InMemoryOutboxTransaction()
 {
     Transaction = new InMemoryTransaction();
 }
示例#7
0
 public InMemorySynchronizedStorageSession(InMemoryTransaction transaction)
 {
     Transaction = transaction;
 }
示例#8
0
 public EnlistmentNotification(InMemoryTransaction transaction)
 {
     this.transaction = transaction;
 }
 public InMemorySynchronizedStorageSession(InMemoryTransaction transaction)
 {
     Transaction = transaction;
 }
 public EnlistmentNotification(InMemoryTransaction transaction)
 {
     this.transaction = transaction;
 }