From f1a4ea0a65c924655e0181d807b4bd86d090e264 Mon Sep 17 00:00:00 2001 From: Chris Bell Date: Thu, 2 Jan 2025 23:21:09 -0600 Subject: [PATCH] Fixed the bad csprojects so both can build just fine, and cleaned up unused usings --- Cogwheel.csproj | 4 ++-- Program.cs | 3 +++ src/COGWHEEL.cs | 5 +++++ src/CogwheelLib.csproj | 6 ++---- src/CommandAttribute.cs | 2 ++ src/CommandsManager.cs | 3 +++ 6 files changed, 17 insertions(+), 6 deletions(-) diff --git a/Cogwheel.csproj b/Cogwheel.csproj index 865efca..04bd726 100644 --- a/Cogwheel.csproj +++ b/Cogwheel.csproj @@ -7,12 +7,12 @@ enable false false + - - + \ No newline at end of file diff --git a/Program.cs b/Program.cs index b72664e..8bbd0d9 100644 --- a/Program.cs +++ b/Program.cs @@ -1,9 +1,12 @@ // Program.cs +using System.Reflection; using Cogwheel; ICogwheelConsole cogwheelConsole = new DeafultCogwheelConsole(); CommandsManager commandsManager = new CommandsManager(); +commandsManager.AddAssembly(Assembly.GetExecutingAssembly()); + COGWHEEL.Initialize(commandsManager, cogwheelConsole); diff --git a/src/COGWHEEL.cs b/src/COGWHEEL.cs index 5b3de99..65e0026 100644 --- a/src/COGWHEEL.cs +++ b/src/COGWHEEL.cs @@ -1,3 +1,6 @@ +using System; +using System.Linq; + namespace Cogwheel; /// @@ -7,6 +10,8 @@ public static class COGWHEEL { private static CommandsManager _commandsManager; private static ICogwheelConsole _console; + + public static bool UseBuiltInCommands { get; set; } = true; /// /// Initializes the Cogwheel system diff --git a/src/CogwheelLib.csproj b/src/CogwheelLib.csproj index 98389fb..98c8ef1 100644 --- a/src/CogwheelLib.csproj +++ b/src/CogwheelLib.csproj @@ -6,9 +6,8 @@ enable enable false - false true - + false 1.2.0 Chris Bell @@ -23,8 +22,7 @@ - - + diff --git a/src/CommandAttribute.cs b/src/CommandAttribute.cs index b3d98c1..22515bc 100644 --- a/src/CommandAttribute.cs +++ b/src/CommandAttribute.cs @@ -1,3 +1,5 @@ +using System; + namespace Cogwheel; /// diff --git a/src/CommandsManager.cs b/src/CommandsManager.cs index c53a954..355627a 100644 --- a/src/CommandsManager.cs +++ b/src/CommandsManager.cs @@ -1,3 +1,6 @@ +using System; +using System.Collections.Generic; +using System.Linq; using System.Reflection; using System.Security.Cryptography; using System.Text;