Interface ICommandFactory
Factory for creating commands from string arguments. Parses debug console input and creates ICommand instances.
Implement this interface and add [CommandMetadata] attribute for automatic discovery by CommandRegistry.
public interface ICommandFactory
Methods
TryCreateCommand(string[], GameState, out ICommand, out string)
Try to create a command from parsed arguments.
bool TryCreateCommand(string[] args, GameState gameState, out ICommand command, out string errorMessage)
Parameters
argsstring[]Command arguments (excludes command name itself)
gameStateGameStateGameState for validation/lookups
commandICommandCreated command if successful
errorMessagestringError message if failed
Returns
- bool
True if command created successfully