feat: IAsyncDisposable/IDisposable on base classes (#92)#248
Merged
Conversation
ExtractorBase, LoaderBase, and TransformerBase now implement IAsyncDisposable and IDisposable with the standard dispose pattern and a default no-op: - virtual ValueTask DisposeAsync() / void Dispose() -> Dispose(true) + SuppressFinalize - protected virtual void Dispose(bool disposing) — base marks disposed (idempotent); derived classes override to release streams/connections/etc. Every component now works with 'await using' out of the box, and base-class stages are disposable via the #133 DisposeStagesOnCompletion path. MINOR / source-compatible but BINARY-BREAKING (adds interfaces to the base classes — consumers recompile; subclasses that already implement IDisposable switch to 'override'). Call out in 0.14.0 release notes. PublicAPI.Shipped.txt regenerated. Verified: full Release build clean across all TFMs (0 warnings); 239 tests pass (5 new disposal tests). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The dispose pattern was added to all three base classes but only the extractor's dispose was tested, dropping LoaderBase (85.9%) and TransformerBase (86.4%) under the 90% per-class coverage gate. Adds ResourceOwningLoader / ResourceOwningTransformer doubles asserting Dispose()/DisposeAsync() invoke the override and the interfaces are implemented. Both classes now ~98% line coverage. 249 tests pass. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This was referenced Jun 25, 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.
Adds
IAsyncDisposable+IDisposableto all three base classes. Closes #92.Stacked on #247 (base
feature/reset-run-state) — it's the tip of the base-class change chain (#244 → #247 → this).What
ExtractorBase,LoaderBase,TransformerBasenow implement both interfaces with the standard dispose pattern and a default no-op:virtual ValueTask DisposeAsync()andvoid Dispose()→Dispose(true)+GC.SuppressFinalizeprotected virtual void Dispose(bool disposing)— base just marks disposed (idempotent); derived classes override to release the resources they own (streams, DB connections, HTTP clients, …) and callbase.Dispose(disposing)Every component works with
await usingout of the box, and base-class stages are now disposable via the #133DisposeStagesOnCompletionpath — the two features compose.Compatibility
MINOR, source-compatible but binary-breaking (adding interfaces to a base class requires consumers to recompile; subclasses that already implement
IDisposableswitch to theoverridekeyword). Needs a call-out in the 0.14.0 release notes.IAsyncDisposableis available on all TFMs via the existingMicrosoft.Bcl.AsyncInterfacesreference.Verified
PublicAPI.Shipped.txtregenerated.Dispose()/DisposeAsync()/await using).Part of: #154