-
-
Notifications
You must be signed in to change notification settings - Fork 4
Add polyfills for File.ReadLinesAsync(...), TextReader.ReadLineAsync(CancellationToken), TextReader.ReadToEndAsync(CancellationToken)
#68
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
…nc(CancellationToken)`, `TextReader.ReadToEndAsync(CancellationToken)`
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 polyfills for three .NET 7.0 APIs related to asynchronous file and text reading operations with cancellation token support: File.ReadLinesAsync, TextReader.ReadLineAsync(CancellationToken), and TextReader.ReadToEndAsync(CancellationToken).
- Implements
TextReader.ReadLineAsync(CancellationToken)andTextReader.ReadToEndAsync(CancellationToken)polyfills for frameworks prior to .NET 7.0 - Adds two overloads of
File.ReadLinesAsyncthat returnIAsyncEnumerable<string>with cancellation support - Includes comprehensive test coverage for the new polyfills including cancellation scenarios
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| PolyShim/Signatures.md | Updates signature counts and documentation to reflect 4 new polyfilled members |
| PolyShim/Net70/TextReader.cs | Implements ReadLineAsync(CancellationToken) and ReadToEndAsync(CancellationToken) polyfills |
| PolyShim/Net70/File.cs | Implements two ReadLinesAsync overloads with async enumerable return type |
| PolyShim.Tests/Net70/TextReaderTests.cs | Adds tests for TextReader polyfills including cancellation scenarios |
| PolyShim.Tests/Net70/FileTests.cs | Adds basic test for File.ReadLinesAsync functionality |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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 5 out of 5 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 #68 +/- ##
============================
============================
☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
No description provided.