Skip to content

Consider exposing IWebAssemblyHostEnvironment from WebAssemblyHostBuilder #19900

@pranavkm

Description

@pranavkm

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 of WebAssemblyHostBuilder 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.

Metadata

Metadata

Assignees

Labels

DoneThis issue has been fixedarea-blazorIncludes: Blazor, Razor ComponentsenhancementThis issue represents an ask for new feature or an enhancement to an existing onefeature-blazor-wasmThis issue is related to and / or impacts Blazor WebAssembly

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions