Update Program.cs with comments explaining how to init Cogwheel

This commit is contained in:
Chris Bell 2025-01-02 23:25:40 -06:00
parent f1a4ea0a65
commit 2a1c40a51c

View File

@ -1,12 +1,20 @@
// Program.cs /*
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 System.Reflection;
using Cogwheel; using Cogwheel;
// Create a new instance of an ICogwheelConsole implementation
ICogwheelConsole cogwheelConsole = new DeafultCogwheelConsole(); ICogwheelConsole cogwheelConsole = new DeafultCogwheelConsole();
// Create a new instance of a CommandsManager
CommandsManager commandsManager = new CommandsManager(); CommandsManager commandsManager = new CommandsManager();
commandsManager.AddAssembly(Assembly.GetExecutingAssembly()); // Register the assembly containing the built-in commands
commandsManager.AddAssembly(Assembly.GetCallingAssembly());
// Initialize the Cogwheel system
COGWHEEL.Initialize(commandsManager, cogwheelConsole); COGWHEEL.Initialize(commandsManager, cogwheelConsole);