Ninject 2.2 multiple bindings

£可爱£侵袭症+ 提交于 2019-12-04 14:57:51
Remo Gloor

Ninject 2.2 ensures that only one matching bindings exists when resolving instances. 2.0 returned an instance of the first matching binding ignoring that there are others. But having multiple bindings if only one is requested reflects a bad configuration and can lead to hard to detect unintended behaviors.

But I see that there should be the possibility to overrule open generic bindings with more specific ones. I'll definitely look into it and it will either be added to a bugfix release or the next major release.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!