Update commands registration
Now use reflection to load all commands directly into the DI container
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
using Akari.Prototype.Server.Cli.Commands;
|
||||
using Akari.Prototype.Server.Options;
|
||||
using Akari.Prototype.Server.Utils.Extensions;
|
||||
using CliFx;
|
||||
using Microsoft.AspNetCore.Hosting;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
@@ -74,9 +75,7 @@ namespace Akari.Prototype.Server
|
||||
{
|
||||
Startup.ConfigureStandardServices(hostContext.Configuration, services);
|
||||
|
||||
services.AddTransient<FingerprintCommands>();
|
||||
services.AddTransient<FingerprintCommands.RemoveFingerprintCommand>();
|
||||
services.AddTransient<FingerprintCommands.AddFingerprintCommand>();
|
||||
services.AddCommandsFromThisAssembly();
|
||||
});
|
||||
|
||||
public static IHostBuilder CreateWebHostBuilder(string[] args) =>
|
||||
|
||||
Reference in New Issue
Block a user