Skip to content

Consider exposing IWebAssemblyHostEnvironment from WebAssemblyHostBuilder #19900

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
pranavkm opened this issue Mar 16, 2020 · 3 comments
Closed
Assignees
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

Comments

@pranavkm
Copy link
Contributor

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.

@pranavkm
Copy link
Contributor Author

/cc @rynowak

@pranavkm pranavkm added area-blazor Includes: Blazor, Razor Components feature-blazor-wasm This issue is related to and / or impacts Blazor WebAssembly labels Mar 16, 2020
@javiercn
Copy link
Member

Yes plz

@mkArtakMSFT mkArtakMSFT added this to the blazor-wasm-3.2-preview4 milestone Mar 17, 2020
@mkArtakMSFT mkArtakMSFT added the enhancement This issue represents an ask for new feature or an enhancement to an existing one label Mar 17, 2020
@captainsafia captainsafia self-assigned this Mar 19, 2020
@SteveSandersonMS
Copy link
Member

Done in #20008
(@captainsafia or if there was anything remaining, please let us know)

@SteveSandersonMS SteveSandersonMS added the Done This issue has been fixed label Mar 20, 2020
@ghost ghost locked as resolved and limited conversation to collaborators Apr 19, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
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
Projects
None yet
Development

No branches or pull requests

5 participants