Skip to content
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

Simplify platform check. #4853

Merged
merged 1 commit into from
Jan 7, 2024
Merged

Simplify platform check. #4853

merged 1 commit into from
Jan 7, 2024

Conversation

geeknoid
Copy link
Member

@geeknoid geeknoid commented Jan 4, 2024

Fixes #4642

Microsoft Reviewers: Open in CodeFlow

@ghost ghost assigned geeknoid Jan 4, 2024
@geeknoid geeknoid requested a review from xakep139 January 4, 2024 22:39
@geeknoid geeknoid enabled auto-merge (squash) January 4, 2024 22:40
@@ -62,7 +62,7 @@ public static class ResourceMonitoringServiceCollectionExtensions
#if NETFRAMEWORK
_ = builder.AddWindowsProvider();
#else
if (GetPlatform() == PlatformID.Win32NT)
if (OperatingSystem.IsWindows())
Copy link
Contributor

@xakep139 xakep139 Jan 5, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In that case we need to check whether else clause falls under IsLinux() - and throw an exception otherwise

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added.

@dotnet-comment-bot
Copy link
Collaborator

🎉 Good job! The coverage increased 🎉
Update MinCodeCoverage in the project files.

Project Expected Actual
Microsoft.Extensions.Http.Diagnostics 91 94

Full code coverage report: https://dev.azure.com/dnceng-public/public/_build/results?buildId=516960&view=codecoverage-tab

@geeknoid geeknoid merged commit 68c6e87 into main Jan 7, 2024
6 checks passed
@geeknoid geeknoid deleted the geeknoid/plat branch January 7, 2024 18:53
@ghost ghost added this to the 8.1 milestone Jan 7, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Feb 7, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Replace outdates platform checks with modern ones
4 participants