Skip to content
This repository has been archived by the owner on Dec 24, 2022. It is now read-only.

Proper casting to interface instead of unextendable redisClient. #237

Merged
merged 1 commit into from Mar 22, 2017
Merged

Proper casting to interface instead of unextendable redisClient. #237

merged 1 commit into from Mar 22, 2017

Conversation

joelharkes
Copy link
Contributor

We have a problem extending the RedisClient (we are making a prefixed redis client) because the methods are not virtual

we subclassed it anyways and just overwrote the interface methods. but the problem is that RedisClientManagerCacheClient.cs hard casted it to RedisClient instead of the appropriate interface leaving us with not possibility to overwrite this method. I fixed the usages in this PR.

Could you please merge and create a new Core release of servicestack soon?

@mythz mythz merged commit b1cbeab into ServiceStack:master Mar 22, 2017
@mythz
Copy link
Member

mythz commented Mar 22, 2017

Did this compile for you? This broke our build.

RedisClientManagerCacheClient.cs(187, 53): error CS1061: 'IRemoveByPattern' does not contain a definition for 'Keys' and no extension method 'Keys' accepting a first argument of type 'IRemoveByPattern' could be found (are you missing a using directive or an assembly reference?)
RedisClientManagerCacheClient.cs(189, 37): error CS1061: 'IRemoveByPattern' does not contain a definition for 'Del' and no extension method 'Del' accepting a first argument of type 'IRemoveByPattern' could be found (are you missing a using directive or an assembly reference?)

@mythz
Copy link
Member

mythz commented Mar 22, 2017

Let me know if this is a quick fix, otherwise I'll need to revert these changes.

@joelharkes
Copy link
Contributor Author

ah yes i see, i had problems running and building it, everything was red here before because i was working on linux but i now have the same errors.

I see the problem

@joelharkes
Copy link
Contributor Author

il fix it

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
2 participants