-
Notifications
You must be signed in to change notification settings - Fork 10k
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
Replace IHostingEnvironment with IWebHostEnvironment #7725
Conversation
When tests pass. |
@@ -9,7 +9,62 @@ namespace Microsoft.AspNetCore.Hosting.Internal | |||
{ | |||
public static class HostingEnvironmentExtensions | |||
{ | |||
#pragma warning disable CS0618 // Type or member is obsolete |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I dunno why this was made public in the first place.
dumb question but why not align interface name ? when people are going to find that’s a really naive question there are probably tons of better reason than doing or |
The new types are:
|
Announcement posted. #7749 |
This is the second half of dotnet/extensions#966
IHostingEnvironment is replaced by IWebHostEnvironment
IApplicationEnvironment is replaced by Extensions.Hosting.IHostApplicationEnvironment
Due to the size and timing of this PR nits in samples or tests are unlikely to be addressed.
Also, there are quite a few public constructors that were modified. These are primarily invoked by DI and there is little end-user impact. I'm not keeping the old constructors as the old types are not convertible to the new types. Removing the old constructors seems preferable to obsoleting them with an error.