How to turn this Service Locator pattern into true Dependency Injection pattern?
问题 I asked a more general question a minute ago: How to organize DI Framework usage in an application?, and the feedback I got was that I was using a Service Locator Pattern rather than true DI as is pointed out by Martin Fowler here: http://martinfowler.com/articles/injection.html Actually, I read that article just the other day, but apparently haven't quite grasped it. So let's say I have the following code: interface ICardReader { string GetInfo(); void SetDebugMode(bool value); void