Conversation
…ext, WriteAllText, ReadAllLines, WriteAllLines (sync + async) Agent-Logs-Url: https://github.com/Tyrrrz/PowerKit/sessions/8dd97e28-26a7-4047-a620-67f1d830cb84 Co-authored-by: Tyrrrz <1935960+Tyrrrz@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Adds convenience extension methods for ZipArchiveEntry to simplify common read/write operations (bytes, text, lines) with sync + async variants, and introduces a corresponding test suite to validate round-trip behavior against in-memory ZIP archives.
Changes:
- Add
ZipArchiveEntryextension methods:ReadAllBytes/Text/Lines+WriteAllBytes/Text/Lineswith async counterparts andCancellationTokensupport. - Add a new test file with one test per method, validating basic read/write round-trips via
ZipArchiveinUpdatemode.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 8 comments.
| File | Description |
|---|---|
| PowerKit/Extensions/ZipArchiveEntryExtensions.cs | New ZipArchiveEntry extensions implementing sync/async read/write helpers for bytes/text/lines. |
| PowerKit.Tests/ZipArchiveEntryExtensionsTests.cs | New test suite covering the added extensions using an in-memory ZipArchive. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…thods Agent-Logs-Url: https://github.com/Tyrrrz/PowerKit/sessions/533023f2-858c-42cd-aea8-fa9a745ece45 Co-authored-by: Tyrrrz <1935960+Tyrrrz@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated 8 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
|
@copilot please update PolyShim to v2.9.0, I've added polyfills that should fix some of the issues you've outlined. |
…e methods Agent-Logs-Url: https://github.com/Tyrrrz/PowerKit/sessions/598780ef-6c48-4930-a2fa-4688da274d5e Co-authored-by: Tyrrrz <1935960+Tyrrrz@users.noreply.github.com>
Done in d729056. PolyShim updated to 2.9.0, which adds |
Agent-Logs-Url: https://github.com/Tyrrrz/PowerKit/sessions/f5a47bec-93ab-4f1e-89c5-84c85767969a Co-authored-by: Tyrrrz <1935960+Tyrrrz@users.noreply.github.com>
Agent-Logs-Url: https://github.com/Tyrrrz/PowerKit/sessions/04188986-75cb-41ca-bf7b-8c3074e3190b Co-authored-by: Tyrrrz <1935960+Tyrrrz@users.noreply.github.com>
ab76e17 to
3f4045f
Compare
…ability and update TFM guards
ZipArchiveEntryhas no convenience API for reading/writing common data types — you must manually open the entry stream and wrap it each time.Changes
PowerKit/Extensions/ZipArchiveEntryExtensions.cs— New extension block onZipArchiveEntrywith sync and async variants:ReadAllBytes/WriteAllBytesReadAllText/WriteAllText— optionalEncodingparameter, defaults to UTF-8ReadAllLines/WriteAllLines— returns/acceptsstring[]/IEnumerable<string>CancellationTokenPowerKit.Tests/ZipArchiveEntryExtensionsTests.cs— One test per method, exercising round-trip read/write against an in-memoryZipArchiveExample