有人可以解释一下两者之间的区别吗
container.Register(AllTypes.FromAssemblyContaining(typeof(BigCompanyRepository))
.WithService.DefaultInterface()
和
container.Register(AllTypes.FromAssemblyContaining(typeof(BigCompanyRepository))
.WithService.AllInterfaces()
“默认界面”是什么意思?
最佳答案
这是一个启发式 looks for an implementation of an interface by removing the leading I
:
然而,在我看来,使用这个功能有点 over-abundance of 1:1 interfaces 的味道。 .
关于inversion-of-control - IoC (Windsor) - 什么是 "Default Interface"?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8184814/