0 我尝试了解MVC3应用程序中的Autofac。 当我有一个接口的几个实现,如何以及在哪里可以决定我想要使用哪一个? 还是有多个实现“不好”?autofac如何选择实现 来源 2012-05-09 Sebastian +0 这是非常合乎逻辑的具有单个接口的多个实施方式中,仅具有单一的实现是可能违反了[重新使用的抽象原理](http://www.codemanship.co.uk/parlezuml的/博客/?=帖子ID 934)。 – Steven +0 好吧,但我如何决定与autofac哪一个是采取? – Sebastian +0 也许这个问题有帮助:http://stackoverflow.com/questions/10486342/would-like-autofac-to-not-register-any-interface-that-has-more-than-one-implenta – Steven
1 Many implementations of the same service can be differentiated using names and keys. 来源 2012-05-10 17:17:35
这是非常合乎逻辑的具有单个接口的多个实施方式中,仅具有单一的实现是可能违反了[重新使用的抽象原理](http://www.codemanship.co.uk/parlezuml的/博客/?=帖子ID 934)。 – Steven
好吧,但我如何决定与autofac哪一个是采取? – Sebastian
也许这个问题有帮助:http://stackoverflow.com/questions/10486342/would-like-autofac-to-not-register-any-interface-that-has-more-than-one-implenta – Steven