Is your feature request related to a problem? Please describe.
With dotnet/runtime#61634 (comment) and dotnet/runtime#65109, Microsoft.Extensions.Hosting added a new way of creating a hosted app that doesn't use IHostBuilder.
Along with that, in .NET 8, the "Worker" project template is getting updated to use these new APIs. See dotnet/aspnetcore#43113.
Describe the solution you'd like
We should add overloads to HostBuilderExtensions that accept an IServiceCollection or HostApplicationBuilder instead of an IHostBuilder. This will allow consumers using the new HostApplicationBuilder to use Steeltoe easily.
|
public static IHostBuilder AddSteeltoe(this IHostBuilder hostBuilder, IEnumerable<string> exclusions = null, ILoggerFactory loggerFactory = null) |
Additional context
See also dotnet/runtime#68580
Is your feature request related to a problem? Please describe.
With dotnet/runtime#61634 (comment) and dotnet/runtime#65109, Microsoft.Extensions.Hosting added a new way of creating a hosted app that doesn't use IHostBuilder.
Along with that, in .NET 8, the "Worker" project template is getting updated to use these new APIs. See dotnet/aspnetcore#43113.
Describe the solution you'd like
We should add overloads to
HostBuilderExtensionsthat accept anIServiceCollectionorHostApplicationBuilderinstead of anIHostBuilder. This will allow consumers using the newHostApplicationBuilderto use Steeltoe easily.Steeltoe/src/Bootstrap/src/AutoConfiguration/HostBuilderExtensions.cs
Line 61 in 9e2cb52
Additional context
See also dotnet/runtime#68580