Skip to content

PluginBootstrapper.Bootstrap event called on each Http Get Request #45

@avatejo

Description

@avatejo

I'm using Prise in a dotnetCore3.1 windows service, that does plugin discovery in the ApplicationLifetime.ApplicationStarted Event to add new Web Controllers at runtime.

Everything works fine !, I'm able to invoke Web Modules Methods, access Host Configuration using the Proxy, and invoke Services registered by the Bootstrapper of each Controller.

I use an Interface to allow Prise discover the module on the ApplicationStarted Event : IWebModule

Later when perform a Http Get request to any Controller method (I have three controllers and three bootstrapper classes), the Bootstrapper event is called.

But then after continuous request, the Bootstrapper event and all services are been loaded again and again.
This seems to me like a performance issue. :(

How can I preserve the scoped ServiceCollection and use the same one over the calls?, there is some singleton services and all other are scoped services.

I would like to: when load the plugin, load the service collection and later be able to access some singleton services inside the Scoped service collection.

I'm developing a Health Check system to monitor the Web Module Status, that is perform getting some data from singleton services running inside the Web Module.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions