Type object code smells
I have been playing around with the Enyim Memcached client for .NET over the past few days. It has a lot of really cool functionality, but one big smell that has been bugging me. Extensibility is used through the Type class, not through dependency injection. Here is the interface for the configuration object. public class MemcachedClientConfiguration : IMemcachedClientConfiguration { public MemcachedClientConfiguration(); public Type NodeLocator { get; set; } public Type KeyTransformer { get; set; } public IList<ipendpoint> Servers { get; } public ISocketPoolConfiguration SocketPool { get; } public Type Transcoder { get; set; } } Note that KeyTransformer, NodeLocator, and Transcoder are extension points for the library (really cool extension points at that). »