Skip to content

Conversation

@Tyrrrz
Copy link
Owner

@Tyrrrz Tyrrrz commented Nov 29, 2025

No description provided.

@Tyrrrz Tyrrrz added the enhancement New feature or request label Nov 29, 2025
Copilot AI review requested due to automatic review settings November 29, 2025 23:50
Copilot finished reviewing on behalf of Tyrrrz November 29, 2025 23:53
Copy link
Contributor

Copilot AI left a 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 two Enum methods that were introduced in later framework versions: Enum.IsDefined<T>(...) (added in .NET 5.0) and Enum.HasFlag(...) (added in .NET Framework 4.0). The polyfills enable these APIs to be used in older framework versions.

Key changes:

  • Adds HasFlag instance method polyfill for pre-.NET 4.0 Framework versions
  • Adds IsDefined<T> static method polyfill for pre-.NET 5.0 versions
  • Updates documentation to reflect the addition of 2 new members (246 total, 184 members)

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.

File Description
PolyShim/Signatures.md Updates totals and adds documentation entries for HasFlag and IsDefined<T>
PolyShim/NetCore10/Enum.cs Implements HasFlag instance method for enum flag checking
PolyShim/Net50/Enum.cs Implements IsDefined<T> generic method as a wrapper around non-generic version
PolyShim.Tests/Net50/EnumTests.cs Adds unit test for IsDefined<T> with valid and invalid enum values

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@Tyrrrz Tyrrrz merged commit 8ce57ad into master Nov 30, 2025
5 checks passed
@codecov
Copy link

codecov bot commented Nov 30, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 0.00%. Comparing base (51eae5d) to head (ac9e837).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@     Coverage Diff      @@
##   master   #57   +/-   ##
============================
============================

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants