Fire diagnostic source events from IHostBuilder.Build (#53757)
* Fire diagnostic source events from IHostBuilder.Build - We want to enable getting access to the IHostBuilder and IHost during the call to IHostBuilder.Build so that we can access the application's IServiceProvider from various tools. Usually, this is enabled by exposing a different entry point from the application but this technique allows us to let the application execute normally and hook important events via a diagnostic source. - Add support for the new pattern in HostFactoryResolver - Added support for resolving an IServiceProvider using the new diagnostics source pattern (which doesn't require a different entrypoint) - Detect the version of Microsoft.Extensions.Hosting before waiting for events to fire - We want to fail fast if we know this version of hosting will never fire events of if the hosting assembly fails to load. Added a version check. - Allow the caller to specify a wait timeout. - Added a flag to allow running the application to completion
Showing
想要评论请 注册 或 登录