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.
Public Member Functions | List of all members
SadSapphicGames.CommandPattern.SimpleComposite Class Reference

A CompositeCommand created from a collection of Command's that cannot fail More...

Inheritance diagram for SadSapphicGames.CommandPattern.SimpleComposite:
SadSapphicGames.CommandPattern.CompositeCommand SadSapphicGames.CommandPattern.Command SadSapphicGames.CommandPattern.ICommand

Public Member Functions

 SimpleComposite (IEnumerable< Command > subCommands)
 Creates a SimpleComposite from a collection of Command's that cannot fail More...
 
- Public Member Functions inherited from SadSapphicGames.CommandPattern.CompositeCommand
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

- Protected Member Functions inherited from SadSapphicGames.CommandPattern.CompositeCommand
virtual void AddChild (ICommand childCommand)
 Adds a Command to this objects children More...
 
- Protected Attributes inherited from SadSapphicGames.CommandPattern.CompositeCommand
List< ICommandsubCommands = 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
 
- Properties inherited from SadSapphicGames.CommandPattern.CompositeCommand
int ChildCount [get]
 Number of child Commands included in this object
 

Detailed Description

A CompositeCommand created from a collection of Command's that cannot fail

Constructor & Destructor Documentation

◆ SimpleComposite()

SadSapphicGames.CommandPattern.SimpleComposite.SimpleComposite ( IEnumerable< Command subCommands)

Creates a SimpleComposite from a collection of Command's that cannot fail

Parameters
subCommandsThe collection of unfailable Commands to be included in the composite
Exceptions
System.ArgumentExceptionOne or more of the Commands included in the argument implement IFailable

The documentation for this class was generated from the following file: