The NanoByte.Common.Undo namespace provides a framework for adding undo/redo functionality to your applications.
Commands that can be executed and also undone are represented using the IUndoCommand interface.
Methods that wish to execute IUndoCommands should take an ICommandExecutor as an input parameter.
To execute an IUndoCommand pass it to the ICommandExecutor.Execute() method. This will then internally call IUndoCommand.Execute() and record the command for later undo operations.