Configuring IoC container from modules/plug-ins ?

Posted by rouen on Stack Overflow See other posts from Stack Overflow or by rouen
Published on 2010-03-25T08:32:56Z Indexed on 2010/05/19 9:30 UTC
Read the original article Hit count: 284

Hi guys, i am in big dilema.. I am working on highly modular web app in ASP.NET MVC 2 (in fact, core will be super lightweight, all work on modules/plugins). I found MEF pretty useful for modules discovery, but i dont want to us it as IoC container. There is pretty good chance that I will need advanced features of "true" IoC container, so I would like to use Unity.

And here is the problem : how to allow modules to configure container (programatically) = register their own types (mvc controllers, custom implementations of services...) at application start without making hard dependency on Unity in all modules ? I know about Common Service Locator project, and it seems pretty good, but this interface co container only allows resolving types, not registering them (afaik).

I really hope you can understand my point, I know my english is terrible (I am from non english speaking country :) Thanks a lot !

© Stack Overflow or respective owner

Related posts about .NET

Related posts about inversion-of-control