Currently there are quite a few DI/IoC-frameworks for .NET out there (http://www.hanselman.com/blog/ListOfNETDependencyInjectionContainersIOC.aspx). I find it quite hard to choose. Therefore I wanted to measure the public opinion and see which framework is the most popular - so please post your favorite framework here and let the people vote...
相关问题
- Generic Generics in Managed C++
- How to Debug/Register a Permanent WMI Event Which
- 'System.Threading.ThreadAbortException' in
- Bulk update SQL Server C#
- Should I use static function in c# where many call
StructureMap
I love the fact that I can configure it all using the fluent interface (aka Configuration DSL). Typesafe configuration is a must when I do refactoring.
Unity It's simple and unintrusive, yet type-safe. And it is created by Microsoft Pattern & Pratices group.
Have a look at Structuremap which is a Dependency Injection / Inversion of Control tool for .Net
I'm currently using Castle.Windsor. Mainly because of the integration it has with the Rhino Tools library.
Autofac. Type-safe and plays well with code-refactoring. Apart from the boiler-plate stuff, I found the delegate factories to be very useful.
I've been watching Kzu (creator of Moq)'s screencast series as he develops Funq - a DI framework that makes extensive use of lambdas the same way Moq does. No release yet but I'm looking forward to trying it out.