CommandPattern 1.0.0
This package contains a collection of classes and interfaces to allow for quick and consistent implementation of the command pattern across projects.
|
A CompositeCommand created from a collection of Command's that cannot fail More...
Public Member Functions | |
SimpleComposite (IEnumerable< Command > subCommands) | |
Creates a SimpleComposite from a collection of Command's that cannot fail More... | |
![]() | |
override void | Execute () |
Queues all of the child commands into the internal CommandStream and attempts to invoke all of them. Will throw an exception if one of its children fails after attempting to revert all its executed commands. More... | |
abstract void | Execute () |
Executes the command, do not invoke directly, instead use a CommandStream. More... | |
abstract void | Execute () |
Executes the function of the command More... | |
Additional Inherited Members | |
![]() | |
virtual void | AddChild (ICommand childCommand) |
Adds a Command to this objects children More... | |
![]() | |
List< ICommand > | subCommands = new List<ICommand>() |
The child Commands that will be executed upon executing this object | |
CommandStream | internalStream = new CommandStream() |
An internal CommandStream to provide more control of the execution of the subCommands of the Composite | |
![]() | |
int | ChildCount [get] |
Number of child Commands included in this object | |
A CompositeCommand created from a collection of Command's that cannot fail
SadSapphicGames.CommandPattern.SimpleComposite.SimpleComposite | ( | IEnumerable< Command > | subCommands | ) |
Creates a SimpleComposite from a collection of Command's that cannot fail
subCommands | The collection of unfailable Commands to be included in the composite |
System.ArgumentException | One or more of the Commands included in the argument implement IFailable |