intelligenthack / intelligentcache

A distributed cache backed by Redis
MIT License
18 stars 2 forks source link

Kill all constructor injection #7

Closed sklivvz closed 3 years ago

sklivvz commented 3 years ago

Please remove the constructor injection. Only require strictly necessary parameters in a constructor. The rest should either (a) not be injected at all or (b) be a property injection with a default value at constructor time. Consider using the config monad that is used in aspnet-core. This allows the user to pass nothing, or to just set what they need instead of having to deal with the internals of your class.

As part of this, we should not depend on Microsoft's DI if possible.

aaubry commented 3 years ago

Fixed by #19