Merged
Conversation
Agent-Logs-Url: https://github.com/Tyrrrz/PowerKit/sessions/e67e2766-bc01-4d84-9bee-de256f078eb3 Co-authored-by: Tyrrrz <1935960+Tyrrrz@users.noreply.github.com>
Copilot created this pull request from a session on behalf of
Tyrrrz
April 17, 2026 12:20
View session
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## prime #45 +/- ##
==========================================
- Coverage 94.36% 94.27% -0.10%
==========================================
Files 82 84 +2
Lines 1740 1764 +24
Branches 141 143 +2
==========================================
+ Hits 1642 1663 +21
- Misses 72 74 +2
- Partials 26 27 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Contributor
There was a problem hiding this comment.
Pull request overview
Ports an AsyncDisposableExtensions helper into PowerKit to allow uniform await using-style disposal by adapting an IDisposable into an async-disposable shape.
Changes:
- Added
ToAsyncDisposable()extension to wrapIDisposableinto an async-disposable adapter that prefersIAsyncDisposable.DisposeAsync()when available. - Added tests intended to cover both the
IAsyncDisposableandIDisposabledisposal paths.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| PowerKit/Extensions/AsyncDisposableExtensions.cs | Introduces ToAsyncDisposable() and an adapter that conditionally calls DisposeAsync() vs Dispose(). |
| PowerKit.Tests/AsyncDisposableExtensionsTests.cs | Adds tests for async vs sync dispatch behavior of the adapter. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Tyrrrz
approved these changes
Apr 17, 2026
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Owner
|
@copilot please apply formatting |
Agent-Logs-Url: https://github.com/Tyrrrz/PowerKit/sessions/8a9fa2ec-9754-43d2-901f-59f99a271658 Co-authored-by: Tyrrrz <1935960+Tyrrrz@users.noreply.github.com>
Contributor
Author
This was referenced May 1, 2026
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.
Ports
AsyncDisposableExtensionsfrom CliWrap into PowerKit as a general-purpose utility.Changes
PowerKit/Extensions/AsyncDisposableExtensions.cs— addsToAsyncDisposable()extension onIDisposablethat wraps the target in anIAsyncDisposableadapter. CallsDisposeAsync()if the object also implementsIAsyncDisposable, otherwise falls back to synchronousDispose(). Useful for writing uniformawait usingdisposal code regardless of the runtime's actual support.PowerKit.Tests/AsyncDisposableExtensionsTests.cs— tests both dispatch paths.Usage