mirror of
https://gitea.tendokyu.moe/Kayori/Medusa.net.git
synced 2026-09-26 08:18:01 +03:00
25 lines
1.0 KiB
C#
25 lines
1.0 KiB
C#
using Abstractions;
|
|
using Microsoft.AspNetCore.Builder;
|
|
|
|
namespace Server.Services;
|
|
|
|
public interface IPluginService
|
|
{
|
|
/// <summary>Pre-build: scan plugin dirs, load slots, call OnBuilderInitialize on each.</summary>
|
|
Task DiscoverPluginsAsync(WebApplicationBuilder builder);
|
|
|
|
/// <summary>Post-build: add slots to the registry, call OnAppInitialize on each.</summary>
|
|
Task ActivatePluginsAsync(WebApplication app);
|
|
|
|
/// <summary>Hot-swap the plugin loaded from the given plugin directory without restarting.</summary>
|
|
Task ReloadAsync(string pluginDir);
|
|
|
|
/// <summary>Unload any plugin loaded from the given DLL or from underneath the given directory, once it's been deleted from disk.</summary>
|
|
Task UnloadAsync(string deletedPath);
|
|
|
|
void SetServiceProvider(IServiceProvider serviceProvider);
|
|
|
|
IEnumerable<IMedusaPlugin> GetPlugins();
|
|
IMedusaPlugin? FindPlugin(string gameCode, int? minVer = null, int? maxVer = null);
|
|
Task<bool> DoesProfileExistAsync(IMedusaPlugin plugin, string cardId);
|
|
} |