Adds Sort and Reverse methods to ListPool#75
Open
mastef wants to merge 3 commits intofaustodavid:mainfrom
Open
Adds Sort and Reverse methods to ListPool#75mastef wants to merge 3 commits intofaustodavid:mainfrom
mastef wants to merge 3 commits intofaustodavid:mainfrom
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR adds Sort and Reverse methods to the ListPool class to provide in-place sorting and reversing functionality similar to the standard List class.
- Implements multiple Sort method overloads supporting default comparer, custom comparer, range-based sorting, and comparison delegate
- Adds Reverse methods for reversing the entire collection or a specified range
- Includes comprehensive unit tests covering all new method variations
Reviewed Changes
Copilot reviewed 2 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src/ListPool/ListPool.cs | Adds Sort and Reverse method implementations with XML documentation |
| tests/ListPool.Netstandard2_0.UnitTests/ListPool/ListPoolTests.cs | Adds unit tests for all Sort and Reverse method overloads |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| List<int> unsortedItems = s_fixture.CreateMany<int>(10).ToList(); | ||
| foreach (var item in unsortedItems) | ||
| { | ||
| Console.WriteLine(item); |
There was a problem hiding this comment.
Remove the Console.WriteLine statement as it's not needed for the test and adds unnecessary output to test execution.
Suggested change
| Console.WriteLine(item); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #74