Description
Is there an existing issue for this?
- I have searched the existing issues
Describe the solution you'd like
.NET 8 introduced the interface IHostedLifecycleService
, which extends IHostedService
with some additional callbacks such as StartingAsync()
and StartedAsync()
. The original API proposal (dotnet/runtime#86511) noted that
This interface is located in the
Microsoft.Extensions.Hosting.Abstractions
assembly which will be supported by the default host (in theMicrosoft.Extensions.Hosting
assembly). Other hosts will need to implement IHostedService in order to support this new interface.
As far as I can see, WebHost did not gain support for this new feature yet.
aspnetcore/src/Hosting/Hosting/src/Internal/WebHost.cs
Lines 22 to 30 in 6d1573a
Would it be possible to add support for IHostedLifecycleService
to WebHost
?