Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix IPGlobalProperties.DomainName to return string.Empty when domain …
…name is not set (#107241) * Fix IPGlobalProperties.DomainName to return string.Empty when domain name is not set Fixes #104882 Fix `IPGlobalProperties.DomainName` to return `string.Empty` instead of `"(none)"` on Linux. * **HostInformationPal.Unix.cs** - Check if the domain name is `"(none)"` in `GetDomainName()`. - Return `string.Empty` if the domain name is `"(none)"`. * **Interop.GetDomainName.cs** - Handle the case where the domain name is not set in `GetDomainName()`. - Return `string.Empty` if the domain name is `"(none)"`. * **IPGlobalPropertiesTest.cs** - Add a test to verify that `IPGlobalProperties.DomainName` returns `string.Empty` when the domain name is not set. * Update Interop.GetDomainName.cs * Update HostInformationPal.Unix.cs * Update IPGlobalPropertiesTest.cs * Update HostInformationPal.Unix.cs --------- Co-authored-by: wfurt <[email protected]>
- Loading branch information