Cogwheel/Program.cs

21 lines
681 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);