C# Class BalloonsPop.Core.Commands.CommandFactory

Implements a factory to create commands.
Inheritance: ICommandFactory
Afficher le fichier Open project: Baloons-Pop-4/Main Class Usage Examples

Méthodes publiques

Méthode Description
CommandFactory ( ) : System

Initializes a new instance of the CommandFactory class.

ContainsKey ( string commandKey ) : bool

A method to check if the command is already created.

CreateCommand ( string commandName ) : ICommand

A method to create a command.

RegisterCommand ( string commandKey, Func commandProvidingMethod ) : void

A method to register a new command.

UnregisterCommand ( string commandKey ) : void

A method to delete a command.

Private Methods

Méthode Description
RegisterDefaults ( ) : void

A method to register default commands.

Method Details

CommandFactory() public méthode

Initializes a new instance of the CommandFactory class.
public CommandFactory ( ) : System
Résultat System

ContainsKey() public méthode

A method to check if the command is already created.
public ContainsKey ( string commandKey ) : bool
commandKey string
Résultat bool

CreateCommand() public méthode

A method to create a command.
public CreateCommand ( string commandName ) : ICommand
commandName string
Résultat ICommand

RegisterCommand() public méthode

A method to register a new command.
public RegisterCommand ( string commandKey, Func commandProvidingMethod ) : void
commandKey string
commandProvidingMethod Func
Résultat void

UnregisterCommand() public méthode

A method to delete a command.
public UnregisterCommand ( string commandKey ) : void
commandKey string
Résultat void