Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR adds a polyfill for the Path.Join(params string?[]) method introduced in .NET Core 3.0, enabling its use on older framework versions. The implementation refactors the existing EndsInDirectorySeparator method to use a new helper method IsDirectorySeparator, which is then reused in the Join implementation.
- Introduces a private
IsDirectorySeparator(char)helper method for cleaner code reuse - Refactors
EndsInDirectorySeparatorto use expression-bodied syntax with the new helper - Implements
Path.Join(params string?[])that concatenates paths with proper separator handling - Adds test coverage for the new
Joinmethod
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| PolyShim/NetCore30/Path.cs | Adds IsDirectorySeparator helper, refactors EndsInDirectorySeparator, and implements Path.Join polyfill with appropriate preprocessor directives for different framework versions |
| PolyShim.Tests/NetCore30/PathTests.cs | Adds Join_Test with three test cases covering path concatenation scenarios including trailing/leading separators and rooted paths |
💡 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 #44 +/- ##
============================
============================
☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
No description provided.