2025-01-03 05:25:40 +00:00
|
|
|
|
/*
|
|
|
|
|
This is an example of how to initialize the Cogwheel system in a console application
|
2025-01-04 01:12:19 +00:00
|
|
|
|
using the default console implementation and adding the assembly containing the built-in commands.
|
2025-01-03 05:25:40 +00:00
|
|
|
|
*/
|
2025-01-01 20:43:35 +00:00
|
|
|
|
|
2025-01-03 05:21:09 +00:00
|
|
|
|
using System.Reflection;
|
2025-01-01 20:43:35 +00:00
|
|
|
|
using Cogwheel;
|
|
|
|
|
|
2025-01-03 05:25:40 +00:00
|
|
|
|
// Create a new instance of an ICogwheelConsole implementation
|
2025-01-01 20:43:35 +00:00
|
|
|
|
ICogwheelConsole cogwheelConsole = new DeafultCogwheelConsole();
|
2025-01-03 05:25:40 +00:00
|
|
|
|
|
|
|
|
|
// Create a new instance of a CommandsManager
|
2025-01-02 04:00:03 +00:00
|
|
|
|
CommandsManager commandsManager = new CommandsManager();
|
2025-01-01 20:43:35 +00:00
|
|
|
|
|
2025-01-03 05:25:40 +00:00
|
|
|
|
// Register the assembly containing the built-in commands
|
|
|
|
|
commandsManager.AddAssembly(Assembly.GetCallingAssembly());
|
2025-01-03 05:21:09 +00:00
|
|
|
|
|
2025-01-03 05:25:40 +00:00
|
|
|
|
// Initialize the Cogwheel system
|
2025-01-01 20:43:35 +00:00
|
|
|
|
COGWHEEL.Initialize(commandsManager, cogwheelConsole);
|
|
|
|
|
|