예제 #1
0
 public void after_commit_transaction_values_persist_to_the_backing_store()
 {
     var back = new Dictionary<int,int>();
     IDictionary<int,int> d = new TransactionalDictionary<int,int>(back);
     d[1] = 2;
     using (var txn = new TransactionScope())
     {
         d[1] = 5;
         txn.Complete();
     }
     Assert.Equal(5, back[1]);
 }
예제 #2
0
        public void after_commit_transaction_values_persist_to_the_backing_store()
        {
            var back = new Dictionary <int, int>();
            IDictionary <int, int> d = new TransactionalDictionary <int, int>(back);

            d[1] = 2;
            using (var txn = new TransactionScope())
            {
                d[1] = 5;
                txn.Complete();
            }
            Assert.Equal(5, back[1]);
        }