using Abstractions; using Microsoft.AspNetCore.Builder; namespace Server.Services; public interface IPluginService { /// Pre-build: scan plugin dirs, load slots, call OnBuilderInitialize on each. Task DiscoverPluginsAsync(WebApplicationBuilder builder); /// Post-build: add slots to the registry, call OnAppInitialize on each. Task ActivatePluginsAsync(WebApplication app); /// Hot-swap the plugin loaded from the given plugin directory without restarting. Task ReloadAsync(string pluginDir); /// Unload any plugin loaded from the given DLL or from underneath the given directory, once it's been deleted from disk. Task UnloadAsync(string deletedPath); void SetServiceProvider(IServiceProvider serviceProvider); IEnumerable GetPlugins(); IMedusaPlugin? FindPlugin(string gameCode, int? minVer = null, int? maxVer = null); Task DoesProfileExistAsync(IMedusaPlugin plugin, string cardId); }