From 3efcb311bae23abca48902039e73490f8af32729 Mon Sep 17 00:00:00 2001 From: Zynh0722 Date: Wed, 7 Feb 2024 05:27:22 -0800 Subject: [PATCH] night feb-07 --- Makefile | 4 ++++ SamplePlugin/Plugin.cs | 21 +++++---------------- 2 files changed, 9 insertions(+), 16 deletions(-) create mode 100644 Makefile diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..a7c8a68 --- /dev/null +++ b/Makefile @@ -0,0 +1,4 @@ +all : build + +build: + dotnet build diff --git a/SamplePlugin/Plugin.cs b/SamplePlugin/Plugin.cs index f133bf0..56346db 100644 --- a/SamplePlugin/Plugin.cs +++ b/SamplePlugin/Plugin.cs @@ -34,20 +34,9 @@ namespace SamplePlugin this.commandManager = commandManager; var pluginList = pluginInterface.InstalledPlugins; - foreach (var plugin in pluginList) + foreach (var command in commandManager.Commands) { - var assemblyName = plugin.GetType().Assembly.GetName().Name; - if ( - !assemblyName.IsNullOrWhitespace() - && !assemblyName.Equals(plugin.InternalName, StringComparison.Ordinal) - ) - { - log.Warning( - "Miss-match: Name: {plugin} AssName: {assemblyName}", - plugin.Name, - assemblyName - ); - } + log.Information($"{command}"); } configuration = @@ -81,12 +70,12 @@ namespace SamplePlugin public void Dispose() { - this.windowSystem.RemoveAllWindows(); + windowSystem.RemoveAllWindows(); ConfigWindow.Dispose(); MainWindow.Dispose(); - this.commandManager.RemoveHandler(CommandName); + _ = commandManager.RemoveHandler(CommandName); } private void OnCommand(string command, string args) @@ -97,7 +86,7 @@ namespace SamplePlugin private void DrawUI() { - this.windowSystem.Draw(); + windowSystem.Draw(); } public void DrawConfigUI()