示例#1
0
 public static void UnLockStatic(StmTransaction <T> stmTransaction)
 {
     foreach (StmRef <T> stmRef in stmTransaction.inTxDict.Keys)
     {
         Monitor.Exit(stmRef.lockObj);
     }
     stmTransaction.isLockedCommit = false;
 }
示例#2
0
 public static void LockStatic(StmTransaction <T> stmTransaction)
 {
     foreach (StmRef <T> stmRef in stmTransaction.inTxDict.Keys)
     {
         Monitor.Enter(stmRef.lockObj);
     }
     stmTransaction.isLockedCommit = true;
 }
        public void Commit()
        {
            StmTransaction <T> .LockStatic(stmTransaction);

            try
            {
                stmTransaction.Commit();
                logger.Log(MethodBase.GetCurrentMethod(), stmTransaction.Revision);
            }
            finally
            {
                StmTransaction <T> .UnLockStatic(stmTransaction);
            }
        }
 public LoggingStmTransaction(StmTransaction <T> stmTransaction)
 {
     this.stmTransaction = stmTransaction;
 }