NServiceBus
NServiceBus copied to clipboard
DefineCriticalErrorAction access to IServiceProvider
Describe the feature.
We are implementing DefineCriticalErrorAction() to shut down the application. In your documentation there is a mention of IHostApplicationLifetime.Stop, but the challenge is that ICriticalErrorContext doesn't give us access to an IServiceProvider where we can get access to IHostApplicationLifetime.
Our workaround is to have a hosted services that polls a static property where DefineCriticalErrorAction() can set the ICriticalErrorContext.
Not pretty.
Additional Context
No response