merken / Prise

A .NET Plugin Framework.
https://merken.github.io/Prise
MIT License
362 stars 39 forks source link

DI With Blazor components #67

Open rfriend-zilo opened 1 year ago

rfriend-zilo commented 1 year ago

To get routing to work with blazor server side - I have to add the loaded plugin assemblies to the router

<Router AppAssembly="@typeof(App).Assembly" AdditionalAssemblies="@_pluginAssemblies">

This then seems to render the loaded plugins fine, until I try to inject plugin services - I can inject things I declare directly in the host (such as config services, etc), but I cannot inject services I've created and set up in the plugin (using bootstrapper and PluginService, etc), it seems to tie the assembly to the host IServiceProvider.

Additionally, I noticed the MvcPluginLoader does not fire the activated method, so i did this manually using IPluginActivator.