Dependency Injection: How to configure interface bindings for wrapping
问题 So, let's say I have an interface IThingFactory : public interface IThingFactory { Thing GetThing(int thingId); } Now, let's say I have a concrete implementation that retrieves Thing s from a database. Now, let's also say I have a concrete implementation that wraps an existing IThingFactory and checks for a Thing 's presence in, say, an in-memory cache before hitting the wrapped IThingFactory . Something like: public class CachedThingFactory : IThingFactory { private IThingFactory _wrapped;