Update Program.cs with comments explaining how to init Cogwheel
This commit is contained in:
parent
f1a4ea0a65
commit
2a1c40a51c
12
Program.cs
12
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 System.Reflection;
|
||||||
using Cogwheel;
|
using Cogwheel;
|
||||||
|
|
||||||
|
// Create a new instance of an ICogwheelConsole implementation
|
||||||
ICogwheelConsole cogwheelConsole = new DeafultCogwheelConsole();
|
ICogwheelConsole cogwheelConsole = new DeafultCogwheelConsole();
|
||||||
|
|
||||||
|
// Create a new instance of a CommandsManager
|
||||||
CommandsManager commandsManager = new 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);
|
COGWHEEL.Initialize(commandsManager, cogwheelConsole);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user