且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

IDependencyResolver是否反模式?

更新时间:2023-12-04 21:54:34

如果你看看签名,你会看到它只是一个服务定位器和另一个名字。 服务定位器是一种反模式,我认为关系是可转移的,所以我认为 IDependencyResolver是一个反模式

If you look at the signature you will see that it's just a Service Locator with another name. Service Locator is an anti-pattern and I consider the relationship transitive, so I consider IDependencyResolver an anti-pattern.

除此之外,界面也是因为没有Release方法而被破坏