Need recommandations for pattern implementation to inject "processors" into a NuGet from WebApp
Hi there,
We are currently developping an internal NuGet package that will send a HTTP Request to another microservice.
Here's a sample of the implementation I am looking for.
- [NuGet package] has a middleware, which is registered in the [WebApp] startup
- [NuGet package] is responsible to create an HTTP request and send it to the microservice
- [WebApp] should be able to create it's own IProcessor that must implement Process() and add any related data it fits required
- [WebApp] should {do something} to "register" it's IProcessor
- [NuGet package] will call the list of registered IProcessor prior to send the request to the microservice
What would be the best way to achieve this (specially the two last items) in .NET core, respecting the Nuget encapsulation.
Thanks :)
0 comments:
Post a Comment