Investigation: Remove DisposableWithMultipleCallsAllowed inner class when Platform.Disposables supports constructor override #509
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.
🔍 Investigation Report
This PR tracks the resolution of issue #122, which requests the removal of the
DisposableWithMultipleCallsAllowedinner class once the upstreamPlatform.Disposableslibrary supports constructor-based override ofAllowMultipleDisposeCalls.📋 Issue Reference
Relates to #122
Depends on linksplatform/Disposables#35
🔎 Investigation Findings
Current Situation
Data.Doublets (this repository):
Platform.Disposablesversion 0.4.0 (via transitive dependency)DisposableWithMultipleCallsAllowedinLinksDisposableDecoratorBase.cs(lines 94-120)Platform.Disposablesdoesn't support constructor-based overridePlatform.Disposables dependency:
PR #95 Status in Disposables Repository
✅ Good news: A complete solution exists!
PR #95 in the Disposables repository:
allowMultipleDisposeCallsandallowMultipleDisposeAttemptsto allDisposableconstructorsBefore (current workaround):
After (when PR #95 is merged and released):
⏳ Blocking Factors
This issue cannot be resolved yet because:
Platform.Disposableshas been released since 0.4.0 (Dec 2022)✅ Action Plan
To resolve this issue, the following steps must occur in order:
Upstream (Platform.Disposables repository):
Downstream (this repository - Data.Doublets):
Platform.Disposablesdependency to new version (≥0.5.0)DisposableWithMultipleCallsAllowedinner class fromLinksDisposableDecoratorBase.csDisposable(disposal, allowMultipleDisposeCalls: true)syntax📝 Recommendations
For Platform.Disposables maintainers:
For Data.Doublets maintainers:
📚 References
/csharp/Platform.Data.Doublets/Decorators/LinksDisposableDecoratorBase.cs:94-120Status: This PR will remain in draft until the upstream dependency provides the required feature.
🤖 Generated with Claude Code
Fixes #122