Exemplo n.º 1
0
        public override void Undo()
        {
            DocLogger.WriteLine(">>> Undo id=" + Id + " name=\"" + Name + "\"");

            base.Undo();

            DocLogger.WriteLine("<<<");
        }
Exemplo n.º 2
0
        private void RollBackTransaction()
        {
            CheckNotInAction();
            CheckInTransaction();

            Transaction tmp = transaction;

            transaction = null;

            tmp.Undo();

            DocLogger.WriteLine("<<< ROLLBACK");
        }
Exemplo n.º 3
0
        public void StartTransaction(int id, string name)
        {
            CheckThreadId();
            CheckNotInAction();
            CheckNotInTransaction();

            if (HasLastTransaction() && LastTransactionId() == id)
            {
                DocLogger.WriteLine(">>> StartTransaction.Restore id=" + id + " name=\"" + name + "\"");
                RestoreLastTransaction();
            }
            else
            {
                DocLogger.WriteLine(">>> StartTransaction.New id=" + id + " name=\"" + name + "\"");
                transaction = new Transaction(id, name);
            }
        }
Exemplo n.º 4
0
        public void EndTransaction()
        {
            CheckThreadId();
            CheckNotInAction();
            CheckInTransaction();

            Transaction tmp = transaction;

            transaction = null;

            if (tmp.HasActions)
            {
                usedTransactioIds.Add(tmp.Id);
                PerformAdd(tmp);
            }

            PerformNotifications();

            DocLogger.WriteLine("<<<");
        }