Sort extension members alphabetically within each extension block#121
Sort extension members alphabetically within each extension block#121
Conversation
Agent-Logs-Url: https://github.com/Tyrrrz/PolyShim/sessions/e385457e-53e6-4de7-8324-b627624a220e Co-authored-by: Tyrrrz <1935960+Tyrrrz@users.noreply.github.com>
|
@copilot please make sure that the order of test methods reflects the order of the actual members they're testing |
There was a problem hiding this comment.
Pull request overview
This PR standardizes member ordering within C# extension blocks across PolyShim by sorting extension members alphabetically (keeping delegating overloads adjacent to the primary overloads), improving readability and consistency in the polyfill surface area.
Changes:
- Reordered extension methods in multiple polyfill files to be alphabetical within each
extensionblock. - Kept overload groupings intact (callee overloads adjacent to delegating overloads) while reordering.
- No functional logic changes intended; changes are organizational.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| PolyShim/Net60/EnumerableExtensions.cs | Alphabetized and regrouped LINQ extension polyfills within the IEnumerable<T> extension block. |
| PolyShim/Net80/CollectionExtensions.cs | Reordered AddRange / CopyTo / InsertRange within the List<T> extension block. |
| PolyShim/Net90/EnumerableExtensions.cs | Reordered AggregateBy, CountBy, and Index within the IEnumerable<T> extension block. |
| PolyShim/NetCore10/EnumerableExtensions.cs | Swapped Append / Prepend ordering within the IEnumerable<T> extension block. |
| PolyShim/NetCore20/CollectionExtensions.cs | Reordered Remove and TryAdd within the IDictionary<TKey, TValue> extension block. |
| PolyShim/NetCore20/EnumerableExtensions.cs | Reordered SkipLast / TakeLast within the IEnumerable<T> extension block. |
| PolyShim/NetCore21/MemoryExtensions.cs | Reordered AsMemory/AsSpan groups and CopyTo overloads; moved Reverse above SequenceEqual in the Span<T> block. |
| PolyShim/NetCore30/TaskAsyncEnumerableExtensions.cs | Reordered ConfigureAwait and WithCancellation within the IAsyncEnumerable<T> extension block. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Agent-Logs-Url: https://github.com/Tyrrrz/PolyShim/sessions/4d07b9f2-36c3-490b-943b-f1ced17a3ac8 Co-authored-by: Tyrrrz <1935960+Tyrrrz@users.noreply.github.com>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## prime #121 +/- ##
=======================================
Coverage 90.68% 90.68%
=======================================
Files 286 286
Lines 4982 4982
Branches 406 406
=======================================
Hits 4518 4518
Misses 372 372
Partials 92 92 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Net60/EnumerableExtensionsTests.cs: Chunk → DistinctBy → ElementAt → ElementAtOrDefault → ExceptBy → FirstOrDefault (×2) → IntersectBy → LastOrDefault (×2) → Max → MaxBy → Min → MinBy → SingleOrDefault (×2) → Take → UnionBy → Zip (×2)Net80/CollectionExtensionsTests.cs: AddRange (×2) → CopyTo (×2) → InsertRangeNet90/EnumerableExtensionsTests.cs: AggregateBy → CountBy → IndexNetCore10/EnumerableExtensionsTests.cs: Append → PrependNetCore20/CollectionExtensionsTests.cs: GetValueOrDefault → Remove (×2) → TryAdd (×2)NetCore20/EnumerableExtensionsTests.cs: SkipLast → TakeLast → ToHashSetNetCore21/MemoryExtensionsTests.cs: Array AsMemory (×3) → AsSpan (×3) → CopyTo(Memory) → CopyTo(Span); ArraySegment AsSpan; String AsMemory (×3) → AsSpan (×3); Span IndexOf → Reverse → SequenceEqual (×3); ReadOnlySpan IndexOf → SequenceEqual (×2)