ApiFramework
ApiFramework copied to clipboard
Make it easier to extend EndpointInitializationOptions with new functionality and provide IServiceProvider
EndpointInitializationOptions can be changed alter what happens when Endpoint initialization start, fails or finishes.
There's two issues:
- IServiceProvider isn't available for example in OnInitialization on in the other events.
- It is only possible to change the default functionality (by configuring for example OnInitializationError) but it is not easy to add new functionality. So if the developer is happy with how OnInitializationError currently operates but would like to add something more (like reporting to Sentry), it's not easy to do and leads to duplication.