-
-
Notifications
You must be signed in to change notification settings - Fork 4
Add polyfills for some of the OperatingSystem.IsXyz() methods
#34
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
Conversation
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.
Pull Request Overview
This PR adds polyfills for operating system detection methods from .NET 5.0, making them available to earlier framework versions. The implementation provides backward compatibility for OS platform checks and version detection.
- Adds
OperatingSystem.IsFreeBSD(),IsLinux(),IsMacOS(),IsWindows(), andIsWindowsVersionAtLeast()methods - Introduces
OSPlatform.FreeBSDproperty for .NET Core 3.0 and earlier - Includes a placeholder
OperatingSystemclass for .NET Core 2.0 and earlier frameworks
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| PolyShim/Net50/OperatingSystem.cs | Implements polyfills for OperatingSystem.IsXyz() methods and IsWindowsVersionAtLeast() for pre-.NET 5.0 frameworks |
| PolyShim/NetCore30/OSPlatform.cs | Adds OSPlatform.FreeBSD property polyfill for .NET Core 3.0 and earlier |
| PolyShim/NetCore20/OperatingSystem.cs | Provides placeholder OperatingSystem class for .NET Core 2.0 and earlier to support extension methods |
| PolyShim/NetCore20/SystemException.cs | Adds blank line for code formatting consistency |
| PolyShim.Tests/Net50/OperatingSystemTests.cs | Adds tests for IsLinux(), IsMacOS(), and IsWindows() methods across different platforms |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <[email protected]>
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.
Pull Request Overview
Copilot reviewed 5 out of 5 changed files in this pull request and generated 5 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
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.
Pull Request Overview
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #34 +/- ##
============================
============================
☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Co-authored-by: Copilot <[email protected]>
No description provided.