diff options
Diffstat (limited to '')
-rw-r--r-- | Utilities/LibMatrix.DevTestBot/Program.cs | 2 | ||||
-rw-r--r-- | Utilities/LibMatrix.JsonSerializerContextGenerator/Program.cs | 2 | ||||
-rw-r--r-- | Utilities/LibMatrix.Utilities.Bot/BotCommandInstaller.cs | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/Utilities/LibMatrix.DevTestBot/Program.cs b/Utilities/LibMatrix.DevTestBot/Program.cs index eb5ad76..daaa65e 100644 --- a/Utilities/LibMatrix.DevTestBot/Program.cs +++ b/Utilities/LibMatrix.DevTestBot/Program.cs @@ -18,7 +18,7 @@ var host = Host.CreateDefaultBuilder(args).ConfigureServices((_, services) => { // ); services.AddScoped<DevTestBotConfiguration>(); services.AddRoryLibMatrixServices(); - foreach (var commandClass in new ClassCollector<ICommand>().ResolveFromAllAccessibleAssemblies()) { + foreach (var commandClass in ClassCollector<ICommand>.ResolveFromAllAccessibleAssemblies()) { Console.WriteLine($"Adding command {commandClass.Name}"); services.AddScoped(typeof(ICommand), commandClass); } diff --git a/Utilities/LibMatrix.JsonSerializerContextGenerator/Program.cs b/Utilities/LibMatrix.JsonSerializerContextGenerator/Program.cs index f33efeb..21c73ef 100644 --- a/Utilities/LibMatrix.JsonSerializerContextGenerator/Program.cs +++ b/Utilities/LibMatrix.JsonSerializerContextGenerator/Program.cs @@ -7,7 +7,7 @@ using LibMatrix.EventTypes; // var asm = Assembly.LoadFrom(binary); File.Delete("EventSerializerContexts.g.cs"); var stream = File.OpenWrite("EventSerializerContexts.g.cs"); -var eventContentTypes = new ClassCollector<EventContent>().ResolveFromAllAccessibleAssemblies(); +var eventContentTypes = ClassCollector<EventContent>.ResolveFromAllAccessibleAssemblies(); stream.WriteString("using System.Text.Json.Serialization;\n"); diff --git a/Utilities/LibMatrix.Utilities.Bot/BotCommandInstaller.cs b/Utilities/LibMatrix.Utilities.Bot/BotCommandInstaller.cs index 215f28a..621c1ee 100644 --- a/Utilities/LibMatrix.Utilities.Bot/BotCommandInstaller.cs +++ b/Utilities/LibMatrix.Utilities.Bot/BotCommandInstaller.cs @@ -37,7 +37,7 @@ public class BotInstaller(IServiceCollection services) { } public BotInstaller DiscoverAllCommands() { - foreach (var commandClass in new ClassCollector<ICommand>().ResolveFromAllAccessibleAssemblies()) { + foreach (var commandClass in ClassCollector<ICommand>.ResolveFromAllAccessibleAssemblies()) { Console.WriteLine($"Adding command {commandClass.Name}"); services.AddScoped(typeof(ICommand), commandClass); } |