Skip to content

Conversation

@Tyrrrz
Copy link
Owner

@Tyrrrz Tyrrrz commented Nov 27, 2025

No description provided.

Copilot AI review requested due to automatic review settings November 27, 2025 15:23
@Tyrrrz Tyrrrz added the enhancement New feature or request label Nov 27, 2025
@Tyrrrz Tyrrrz changed the title asd Add polyfill for HashSet<T>.TryGetValue(...) Nov 27, 2025
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 polyfill implementations of the TryGetValue method for HashSet<T> and SortedSet<T> collections, targeting older framework versions (NETCOREAPP < 2.0, NETFRAMEWORK < 4.7.2, NETSTANDARD < 2.1). The implementations iterate through the sets to find values using their respective comparers, along with test coverage for both.

  • Added TryGetValue extension methods for HashSet<T> and SortedSet<T>
  • Included test suites for both implementations
  • Used the extension syntax pattern consistent with the existing codebase

Reviewed changes

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

File Description
PolyShim/NetCore20/SortedSet.cs Adds TryGetValue polyfill for SortedSet<T> with proper nullability annotations using [MaybeNullWhen(false)]
PolyShim/NetCore20/HashSet.cs Adds TryGetValue polyfill for HashSet<T>, but uses inconsistent nullability annotation and missing required import
PolyShim.Tests/NetCore20/SortedSetTests.cs Comprehensive test coverage with 9 test cases covering various scenarios including custom comparers, value types, and edge cases
PolyShim.Tests/NetCore20/HashSetTests.cs Basic test coverage with only 3 test cases, missing several scenarios covered in SortedSetTests

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

@Tyrrrz Tyrrrz requested a review from Copilot November 27, 2025 15:28
@Tyrrrz Tyrrrz changed the title Add polyfill for HashSet<T>.TryGetValue(...) Add polyfills for HashSet<T>.TryGetValue(...) and SortedSet<T>.TryGetValue(...) Nov 27, 2025
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

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.


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

Copy link
Contributor

Copilot AI commented Nov 27, 2025

@Tyrrrz I've opened a new pull request, #51, to work on those changes. Once the pull request is ready, I'll request review from you.

Copilot AI and others added 2 commits November 27, 2025 17:42
Co-authored-by: Tyrrrz <1935960+Tyrrrz@users.noreply.github.com>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
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