Interface IPluginServiceSource
- Namespace
- SkyrimForge.Hosting
- Assembly
- SkyrimForge.dll
Adds a library's services so plugins can declare them as constructor parameters for dependency injection.
public interface IPluginServiceSource
Remarks
The framework loads an implementation from SKSE\Plugins\SkyrimForge\SharedLibraries<Name><Name>.dll, not from the plugin directory,
and constructs it through a public parameterless constructor.
A project that sets the MSBuild property SkyrimForgeSharedLibrary to true builds its assembly there.
Methods
AddServices(IServiceRegistrar)
Adds a library's services. The framework calls this once for each plugin, whether an IPlugin class or a class marked [PapyrusScript].
void AddServices(IServiceRegistrar serviceRegistrar)
Parameters
serviceRegistrarIServiceRegistrar