StackExchange / StackExchange/StackExchange.Redis

Change DefaultOptionsProvider.AfterConnectAsync to receive an IConnectionMultiplexer rather than ConnectionMultiplexer?

Open
#2,439 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

💔 breaking-change
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.