Cogwheel/Program.cs

21 lines
682 B
C#
Raw Normal View History

/*
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.
*/
2025-01-01 20:43:35 +00:00
using System.Reflection;
2025-01-01 20:43:35 +00:00
using Cogwheel;
// Create a new instance of an ICogwheelConsole implementation
2025-01-01 20:43:35 +00:00
ICogwheelConsole cogwheelConsole = new DeafultCogwheelConsole();
// Create a new instance of a CommandsManager
CommandsManager commandsManager = new CommandsManager();
2025-01-01 20:43:35 +00:00
// Register the assembly containing the built-in commands
commandsManager.AddAssembly(Assembly.GetCallingAssembly());
// Initialize the Cogwheel system
2025-01-01 20:43:35 +00:00
COGWHEEL.Initialize(commandsManager, cogwheelConsole);