StackExchange / StackExchange/StackExchange.Redis
Change DefaultOptionsProvider.AfterConnectAsync to receive an IConnectionMultiplexer rather than ConnectionMultiplexer?
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 6.2k
- Forks
- 1.6k
- Avg merge
- 1d 15h
- Merged PRs (30d)
- 43
Description
Receiving the interface rather than class type would make it easier to unit test custom options providers, and would seem to align better with using interfaces as the public API surface.
Of course this would require a change to the public API, and some adjustments within the library itself. Thoughts?
Current:
public virtual Task AfterConnectAsync(ConnectionMultiplexer multiplexer, Action<string> log) => Task.CompletedTask;
Proposed:
public virtual Task AfterConnectAsync(IConnectionMultiplexer multiplexer, Action<string> log) => Task.CompletedTask;
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Locate DefaultOptionsProvider.AfterConnectAsync and its callers or overrides in the C# library. Compare the current ConnectionMultiplexer parameter with the proposed IConnectionMultiplexer parameter; the work is done when the public API and affected internal uses consistently support the interface and custom options providers can use it.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp, redis
- Domain
- api
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100