-
-
Notifications
You must be signed in to change notification settings - Fork 4
Add polyfill for List<T>.EnsureCapacity(...)
#47
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 a polyfill for the List<T>.EnsureCapacity(int) method that was introduced in .NET 6.0, making it available for older .NET versions including .NET Core (pre-6.0), .NET Framework, and .NET Standard.
- Implements
EnsureCapacityextension method with proper parameter validation - Adds comprehensive test coverage for the new functionality
- Updates signature documentation with method count
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| PolyShim/Signatures.md | Updates total counts and documents the new List<T>.EnsureCapacity(int) API with link to official documentation |
| PolyShim/Net60/List.cs | Implements the polyfill extension method with negative capacity validation and capacity adjustment logic |
| PolyShim.Tests/Net60/ListTests.cs | Adds three test cases covering capacity increase, no-op when already sufficient, and negative parameter validation |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
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 3 out of 3 changed files in this pull request and generated no new comments.
💡 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 #47 +/- ##
============================
============================
☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
No description provided.