StackExchange/StackExchange.Redis — pull request #97 by mwikstrom (2014-09-29 11:06:11+00:00)
Title: Key space isolation extension to ISubscriber

I think there should be a `WithKeyPrefix` extension for `ISubscriber` too. Here's one (with tests).

The proposed implementation keeps track of mapped handlers so that they can be used for unsubscribe invocations.

It also keeps track of all subscriptions so that they can be unsubscribed from when calling `UnsubscribeAll`. With this approach the wrapper will do one `UnsubscribeAsync` per channel.

As an alternative, it could do a prefixed `PUNSUBSCRIBE`. However, that might not be what the user wants, and it would require the extension to be more tightly integrated with the underlying `RedisSubscriber`, right?

Also: I made `ConnectionMultiplexer.CreateMultiplexer` internal so that it can be used from unit tests.