i've been trying to get my head around on EntLib 5.1 Unity and it's confusing me a lot http://msdn.microsoft.com/en-us/library/ff660864%28v=PandP.20%29.aspx.
Could an开发者_Python百科yone please tell me on what type of scenario I can use Unity?
I've a requirement to load the specific dll based on request type. Can Unity be used on this scenario?
Thanks a lot.
For dynamically loading DLLs, you may want to take a look at MEF.
Unity is for decoupling dependencies among classes to make it easier to write testable, reusable code.
It is an Inversion of Control (IoC) container library that makes it easier to do Dependency Injection. There are numerous examples on Stack Overflow. Note that you can configure Unity in code (my preference) or with a configuration file.
精彩评论