Consider exposing IWebAssemblyHostEnvironment from WebAssemblyHostBuilder #19900
Labels
area-blazor
Includes: Blazor, Razor Components
Done
This issue has been fixed
enhancement
This issue represents an ask for new feature or an enhancement to an existing one
feature-blazor-wasm
This issue is related to and / or impacts Blazor WebAssembly
Milestone
As part of the config change, we added a
IWebAsemblyHostEnvironment
to Blazor that exposes the host's environment: https://github.com/dotnet/aspnetcore/blob/blazor-wasm/src/Components/WebAssembly/WebAssembly/src/Hosting/IWebAssemblyHostEnvironment.cs. The type is added to DI which makes it difficult to use as part of startup code. We should consider additionally exposing it as part ofWebAssemblyHostBuilder
as a property.In addition, the host environment is also missing convenience extension methods such as
IsDevelopment
,IsProduction
etc. We should consider porting those over.The text was updated successfully, but these errors were encountered: