StackExchange.Redis
StackExchange.Redis copied to clipboard
Change DefaultOptionsProvider.AfterConnectAsync to receive an IConnectionMultiplexer rather than ConnectionMultiplexer?
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;
If we were starting fresh: yeah, sure, but now that it's in I wouldn't binary break for this - not worth a 3.x release :) Though we can look at doing so in 3.x!
Should we introduce a label like "considerFor3x" to tag things like this and easily find them later?
Gotcha covered :)