コード例 #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;
 }
コード例 #3
0
        public void Commit()
        {
            StmTransaction <T> .LockStatic(stmTransaction);

            try
            {
                stmTransaction.Commit();
                logger.Log(MethodBase.GetCurrentMethod(), stmTransaction.Revision);
            }
            finally
            {
                StmTransaction <T> .UnLockStatic(stmTransaction);
            }
        }
コード例 #4
0
 public LoggingStmTransaction(StmTransaction <T> stmTransaction)
 {
     this.stmTransaction = stmTransaction;
 }