Class CompositeCommand
Combines multiple IUndoCommands into a single atomic transaction.
Implements
Namespace: NanoByte.Common.Undo
Assembly: NanoByte.Common.dll
Syntax
public class CompositeCommand : SimpleCommand, IUndoCommand
Constructors
CompositeCommand(IUndoCommand[])
Creates a new composite command.
Declaration
public CompositeCommand(params IUndoCommand[] commands)
Parameters
Type | Name | Description |
---|---|---|
IUndoCommand[] | commands | The commands to be contained inside the transaction. |
Methods
OnExecute()
Executes all the contained IUndoCommands in order.
Declaration
protected override void OnExecute()
Overrides
OnUndo()
Undoes all the contained IUndoCommands in reverse order.
Declaration
protected override void OnUndo()