mirror of
https://github.com/snltty/linker.git
synced 2025-12-24 12:38:04 +08:00
40 lines
1.4 KiB
C#
40 lines
1.4 KiB
C#
using cmonitor.config;
|
|
using cmonitor.plugins.command.messenger;
|
|
using cmonitor.plugins.command.report;
|
|
using cmonitor.startup;
|
|
using Microsoft.Extensions.DependencyInjection;
|
|
using System.Reflection;
|
|
|
|
namespace cmonitor.plugins.command
|
|
{
|
|
public sealed class CommandStartup : IStartup
|
|
{
|
|
public StartupLevel Level => StartupLevel.Normal;
|
|
public string Name => "command";
|
|
public bool Required => false;
|
|
public string[] Dependent => Array.Empty<string>();
|
|
public StartupLoadType LoadType => StartupLoadType.Dependent;
|
|
|
|
public void AddClient(ServiceCollection serviceCollection, Config config, Assembly[] assemblies)
|
|
{
|
|
serviceCollection.AddSingleton<CommandReport>();
|
|
serviceCollection.AddSingleton<ICommandLine, CommandLineWindows>();
|
|
serviceCollection.AddSingleton<CommandClientMessenger>();
|
|
}
|
|
|
|
public void AddServer(ServiceCollection serviceCollection, Config config, Assembly[] assemblies)
|
|
{
|
|
serviceCollection.AddSingleton<CommandServerMessenger>();
|
|
serviceCollection.AddSingleton<CommandApiController>();
|
|
}
|
|
|
|
public void UseClient(ServiceProvider serviceProvider, Config config, Assembly[] assemblies)
|
|
{
|
|
}
|
|
|
|
public void UseServer(ServiceProvider serviceProvider, Config config, Assembly[] assemblies)
|
|
{
|
|
}
|
|
}
|
|
}
|