Beispiel #1
0
        public void UndoLast()
        {
            if (!CanUndo)
            {
                logger.Warn("No command to undo.");
                return;
            }

            var cmd = commandHistory.Pop();

            undoHistory.Push(cmd);

            logger.Info("Undoing command: {0}", cmd.GetType().Name);

            executor.HandleExecution(PublishMessageWhenFinished(cmd.Undo(), cmd));
        }