linksplatform / linksplatform/Disposables

Add constructor that can override values of AllowMultipleDisposeCalls and AllowMultipleDisposeAttempts properties

Open
#35 0 comments 0 reactions 0 assignees View on GitHub
enhancement good first issue
Dominant language
C#
Stars
1
Forks
2
PR merge metrics
No merged PRs in 30d

Description

https://github.com/linksplatform/Disposables/blob/b18f670e32bcf0e4ab220b5f76bdf212d564f346/Platform.Disposables/Disposable.cs#L26
At the moment the workaround is used:
```C#
public class DisposableWithMultipleCallsAllowed : Disposable
{
public DisposableWithMultipleCallsAllowed(Disposal disposal) : base(disposal) { }
protected override bool AllowMultipleDisposeCalls => true;
}
```

Contributor guide

No contributing guide indexed for this repository

Research direction

Start in Platform.Disposables/Disposable.cs at the linked property definitions and inspect the existing constructor and override behavior. Add a constructor option for AllowMultipleDisposeCalls and AllowMultipleDisposeAttempts so callers do not need the shown subclass workaround; done means both values can be configured when creating a Disposable.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
tooling
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.