From 9efb2efc582e3d57154f40f519762a07b9d00501 Mon Sep 17 00:00:00 2001 From: Rory& Date: Tue, 17 Sep 2024 04:35:29 +0200 Subject: Arcanelibs changes --- ArcaneLibs | 2 +- LibMatrix/StateEvent.cs | 2 +- Utilities/LibMatrix.DevTestBot/Program.cs | 2 +- Utilities/LibMatrix.JsonSerializerContextGenerator/Program.cs | 2 +- Utilities/LibMatrix.Utilities.Bot/BotCommandInstaller.cs | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/ArcaneLibs b/ArcaneLibs index f09a666..b7685c7 160000 --- a/ArcaneLibs +++ b/ArcaneLibs @@ -1 +1 @@ -Subproject commit f09a666ee13152d1e170626534b04e9f4a9130f0 +Subproject commit b7685c786b29e7f8ae2db6ff0f79a52efc57020c diff --git a/LibMatrix/StateEvent.cs b/LibMatrix/StateEvent.cs index 81ee3fe..073d26d 100644 --- a/LibMatrix/StateEvent.cs +++ b/LibMatrix/StateEvent.cs @@ -13,7 +13,7 @@ using LibMatrix.Extensions; namespace LibMatrix; public class StateEvent { - public static FrozenSet KnownStateEventTypes { get; } = new ClassCollector().ResolveFromAllAccessibleAssemblies().ToFrozenSet(); + public static FrozenSet KnownStateEventTypes { get; } = ClassCollector.ResolveFromAllAccessibleAssemblies().ToFrozenSet(); public static FrozenDictionary KnownStateEventTypesByName { get; } = KnownStateEventTypes.Aggregate( new Dictionary(), 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(); services.AddRoryLibMatrixServices(); - foreach (var commandClass in new ClassCollector().ResolveFromAllAccessibleAssemblies()) { + foreach (var commandClass in ClassCollector.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().ResolveFromAllAccessibleAssemblies(); +var eventContentTypes = ClassCollector.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().ResolveFromAllAccessibleAssemblies()) { + foreach (var commandClass in ClassCollector.ResolveFromAllAccessibleAssemblies()) { Console.WriteLine($"Adding command {commandClass.Name}"); services.AddScoped(typeof(ICommand), commandClass); } -- cgit 1.4.1