diff --git a/Program.cs b/Program.cs index 8bbd0d9..26e7a72 100644 --- a/Program.cs +++ b/Program.cs @@ -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 Cogwheel; +// Create a new instance of an ICogwheelConsole implementation ICogwheelConsole cogwheelConsole = new DeafultCogwheelConsole(); + +// Create a new instance of a 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);