Make IHostEnvironment.ApplicationName non-nullable#72945
Make IHostEnvironment.ApplicationName non-nullable#72945eerhardt merged 2 commits intodotnet:mainfrom
Conversation
It is not intended that normal execution has a null ApplicationName, so don't make callers need to check for null. When an ApplicationName is not available, it is set to string.Empty. Fix dotnet#68512
|
Note regarding the This serves as a reminder for when your PR is modifying a ref *.cs file and adding/modifying public APIs, to please make sure the API implementation in the src *.cs file is documented with triple slash comments, so the PR reviewers can sign off that change. |
|
Tagging subscribers to this area: @dotnet/area-extensions-hosting Issue DetailsIt is not intended that normal execution has a null ApplicationName, so don't make callers need to check for null. When an ApplicationName is not available, it is set to string.Empty. Fix #68512
|
|
@halter73 - any concern with using |
halter73
left a comment
There was a problem hiding this comment.
I think using string.Empty instead of something like <Unknown> is reasonable since hosting assumes that a non-empty app name is the name of the assembly containing the UserSecretsIdAttribute. It's easier to special case string.Empty than <Unknown>, and still communicates that a good default app name couldn't be determined.
It is not intended that normal execution has a null ApplicationName, so don't make callers need to check for null. When an ApplicationName is not available, it is set to string.Empty.
Fix #68512