From 2a1c40a51c3925db3fdd2b0d265e90495a1d704d Mon Sep 17 00:00:00 2001 From: Chris Bell Date: Thu, 2 Jan 2025 23:25:40 -0600 Subject: [PATCH] Update Program.cs with comments explaining how to init Cogwheel --- Program.cs | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) 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);