public void Execute(ICommand command) { try { command.Execute(); stack.AddItem(command); RaiseOperationExecuted(command, ExecutionOperation.Execute); } catch { throw; } }
public void Execute(ICommand command) { try { if (typeof(UndoableCommandBase).IsAssignableFrom(command.GetType())) { stack.AddItem(command as UndoableCommandBase); } command.Execute(null); RaiseOperationExecuted(command, CommandOperation.Execute); } catch { throw; } }