using Abstractions; namespace Server.Plugins; public sealed class PluginSlot( PluginLoadContext context, IMedusaPlugin plugin, IReadOnlyList handlerTypes, IServiceProvider pluginServices) { public PluginLoadContext Context => context; public IMedusaPlugin Plugin => plugin; public IReadOnlyList HandlerTypes => handlerTypes; public PluginSlotKey Key => new(plugin.GameCode, plugin.MinVer, plugin.MaxVer); /// Mini service provider built from the plugin's ConfigurePluginServices call. public IServiceProvider PluginServices => pluginServices; public void Unload() { context.Unload(); if (pluginServices is IDisposable d) d.Dispose(); } }