Пример #1
0
 public Transaction(UInt64LinksTransactionsLayer layer)
 {
     _layer = layer;
     if (_layer._currentTransactionId != 0)
     {
         throw new NotSupportedException("Nested transactions not supported.");
     }
     IsCommitted  = false;
     IsReverted   = false;
     _transitions = new Queue <Transition>();
     SetCurrentTransaction(layer, this);
 }
Пример #2
0
 public static void SetCurrentTransaction(UInt64LinksTransactionsLayer layer, Transaction transaction)
 {
     layer._currentTransactionId          = layer._lastCommitedTransactionId + 1;
     layer._currentTransactionTransitions = transaction._transitions;
     layer._currentTransaction            = transaction;
 }