예제 #1
0
 /// <summary>
 /// Mark the transaction as finished when the results of
 /// the transaction have been received. Do not call this
 /// method in any other occasion.
 /// </summary>
 protected void Finish()
 {
     if (Status == KmodTransactionStatus.Executing)
     {
         Status = KmodTransactionStatus.Finished;
     }
 }
예제 #2
0
        public void CancelTransaction(KmodTransaction transaction)
        {
            KmodTransactionStatus prevStatus = transaction.Status;

            transaction.Status = KmodTransactionStatus.Finished;
            transaction.Ex     = new Exception("transaction cancelled");

            // Cancel a queued transaction.
            if (prevStatus == KmodTransactionStatus.Queued)
            {
                m_transactionQueue.Remove(transaction);
            }

            // Cancel an executing transaction. We have to stop KMOD since the
            // transaction is under way.
            else if (prevStatus == KmodTransactionStatus.Executing)
            {
                Debug.Assert(transaction == m_curTransaction);
                EndCurrentTransaction();
                StopKmodThread();
                RequestRun();
            }
        }
예제 #3
0
파일: WmKmodBroker.cs 프로젝트: tmbx/kwm-ng
 /// <summary>
 /// Mark the transaction as finished when the results of
 /// the transaction have been received. Do not call this
 /// method in any other occasion.
 /// </summary>
 protected void Finish()
 {
     if (Status == KmodTransactionStatus.Executing) Status = KmodTransactionStatus.Finished;
 }