StartReadOnlyTransaction() public method

public StartReadOnlyTransaction ( ) : IKeyValueDBTransaction
return IKeyValueDBTransaction
Beispiel #1
0
 public void ReadOnlyTransactionThrowsOnWriteAccess()
 {
     using (IKeyValueDB db = new InMemoryKeyValueDB())
     {
         using (var tr = db.StartReadOnlyTransaction())
         {
             Assert.Throws<BTDBTransactionRetryException>(() => tr.CreateKey(new byte[1]));
         }
     }
 }