Cogwheel/Program.cs
Chris Bell 8ffedd6ba9 - Added more public CommandsManager access methods to the COGWHEEL static class
- Ability to add custom parsers to the CommandManager with AddCustomerParser(Type, Func<string, object>)
- Added two custom parsers from the COGWHEEL class: `System.Numerics.Vector2` and `System.Numerics.Vector3`
2025-01-03 19:12:19 -06:00

21 lines
682 B
C#

/*
This is an example of how to initialize the Cogwheel system in a console application
using the default console implementation and adding the assembly containing the built-in commands.
*/
using System.Reflection;
using Cogwheel;
// Create a new instance of an ICogwheelConsole implementation
ICogwheelConsole cogwheelConsole = new DeafultCogwheelConsole();
// Create a new instance of a CommandsManager
CommandsManager commandsManager = new CommandsManager();
// Register the assembly containing the built-in commands
commandsManager.AddAssembly(Assembly.GetCallingAssembly());
// Initialize the Cogwheel system
COGWHEEL.Initialize(commandsManager, cogwheelConsole);