Skip to content

Conversation

@konard
Copy link
Member

@konard konard commented Oct 30, 2025

🔍 Investigation Report

This PR tracks the resolution of issue #122, which requests the removal of the DisposableWithMultipleCallsAllowed inner class once the upstream Platform.Disposables library supports constructor-based override of AllowMultipleDisposeCalls.

📋 Issue Reference

Relates to #122
Depends on linksplatform/Disposables#35


🔎 Investigation Findings

Current Situation

Data.Doublets (this repository):

  • Currently uses Platform.Disposables version 0.4.0 (via transitive dependency)
  • Contains workaround inner class DisposableWithMultipleCallsAllowed in LinksDisposableDecoratorBase.cs (lines 94-120)
  • This workaround is necessary because the current version of Platform.Disposables doesn't support constructor-based override

Platform.Disposables dependency:

  • Latest NuGet release: 0.4.0 (released December 15, 2022)
  • Target framework: .NET 7 (now updated to .NET 8 in main branch)
  • Issue Use group expression instead #35 is still open (created Feb 24, 2020, no updates)
  • PR #95 exists with the solution but is not yet merged

PR #95 Status in Disposables Repository

Good news: A complete solution exists!

PR #95 in the Disposables repository:

  • Title: "Add constructor overloads to override AllowMultipleDisposeCalls and AllowMultipleDisposeAttempts"
  • Status: Open (created September 14, 2025)
  • Author: konard
  • Changes:
    • Adds constructor parameters allowMultipleDisposeCalls and allowMultipleDisposeAttempts to all Disposable constructors
    • Includes comprehensive tests (11/11 passing)
    • Fully backward compatible
    • Ready to merge

Before (current workaround):

protected class DisposableWithMultipleCallsAllowed : Disposable
{
    public DisposableWithMultipleCallsAllowed(Disposal disposal) : base(disposal) { }
    protected override bool AllowMultipleDisposeCalls => true;
}

After (when PR #95 is merged and released):

var disposable = new Disposable(disposal, allowMultipleDisposeCalls: true);

⏳ Blocking Factors

This issue cannot be resolved yet because:

  1. ❌ PR #95 in Disposables repository is not merged
  2. ❌ No new version of Platform.Disposables has been released since 0.4.0 (Dec 2022)
  3. ❌ The required feature is not available in any published NuGet package

✅ Action Plan

To resolve this issue, the following steps must occur in order:

Upstream (Platform.Disposables repository):

  1. ✅ Solution implemented in PR #95 (already done)
  2. ⏸️ WAITING: PR #95 needs to be reviewed and merged
  3. ⏸️ WAITING: New version needs to be released to NuGet (e.g., 0.5.0)

Downstream (this repository - Data.Doublets):

  1. ⏸️ Update Platform.Disposables dependency to new version (≥0.5.0)
  2. ⏸️ Remove DisposableWithMultipleCallsAllowed inner class from LinksDisposableDecoratorBase.cs
  3. ⏸️ Update constructor to use new Disposable(disposal, allowMultipleDisposeCalls: true) syntax
  4. ⏸️ Test all changes
  5. ⏸️ Close issue Remove this inner class, when Disposable class start support AllowMultipleDisposeCalls value overriding #122

📝 Recommendations

For Platform.Disposables maintainers:

For Data.Doublets maintainers:


📚 References


Status: This PR will remain in draft until the upstream dependency provides the required feature.

🤖 Generated with Claude Code

Fixes #122

Adding CLAUDE.md with task information for AI processing.
This file will be removed when the task is complete.

Issue: undefined
@konard konard self-assigned this Oct 30, 2025
@konard konard changed the title [WIP] Remove this inner class, when Disposable class start support AllowMultipleDisposeCalls value overriding Investigation: Remove DisposableWithMultipleCallsAllowed inner class when Platform.Disposables supports constructor override Oct 30, 2025
@konard konard marked this pull request as ready for review October 30, 2025 04:13
@konard
Copy link
Member Author

konard commented Oct 30, 2025

🤖 Solution Draft Log

This log file contains the complete execution trace of the AI solution draft process.

📎 Log file uploaded as GitHub Gist (188KB)
🔗 View complete solution draft log


Now working session is ended, feel free to review and add any feedback on the solution draft.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Remove this inner class, when Disposable class start support AllowMultipleDisposeCalls value overriding

2 participants