mirror of
https://gitea.tendokyu.moe/Kayori/Medusa.net.git
synced 2026-09-26 00:07:57 +03:00
11 lines
417 B
C#
11 lines
417 B
C#
namespace Server.Plugins;
|
|
|
|
/// <summary>
|
|
/// Resolves services from the plugin's own mini-container first,
|
|
/// falling back to the host container for shared services (ICardService, IUserService, etc.).
|
|
/// </summary>
|
|
internal sealed class PluginServiceProvider(IServiceProvider plugin, IServiceProvider host) : IServiceProvider
|
|
{
|
|
public object? GetService(Type t) => plugin.GetService(t) ?? host.GetService(t);
|
|
}
|