mirror of
https://github.com/snltty/linker.git
synced 2025-10-19 15:34:36 +08:00
40 lines
1.1 KiB
C#
40 lines
1.1 KiB
C#
using linker.config;
|
|
using linker.startup;
|
|
using Microsoft.Extensions.DependencyInjection;
|
|
using System.Reflection;
|
|
|
|
namespace linker.plugins.logger
|
|
{
|
|
public sealed class LoggerStartup : IStartup
|
|
{
|
|
public StartupLevel Level => StartupLevel.Top;
|
|
public string Name => "logger";
|
|
|
|
public bool Required => false;
|
|
|
|
public string[] Dependent => new string[] { };
|
|
|
|
public StartupLoadType LoadType => StartupLoadType.Normal;
|
|
|
|
|
|
public void AddClient(ServiceCollection serviceCollection, FileConfig config, Assembly[] assemblies)
|
|
{
|
|
serviceCollection.AddSingleton<LoggerClientApiController>();
|
|
}
|
|
|
|
public void AddServer(ServiceCollection serviceCollection, FileConfig config, Assembly[] assemblies)
|
|
{
|
|
|
|
}
|
|
|
|
public void UseClient(ServiceProvider serviceProvider, FileConfig config, Assembly[] assemblies)
|
|
{
|
|
LoggerClientApiController logger = serviceProvider.GetService<LoggerClientApiController>();
|
|
}
|
|
|
|
public void UseServer(ServiceProvider serviceProvider, FileConfig config, Assembly[] assemblies)
|
|
{
|
|
}
|
|
}
|
|
}
|