Before some I have written a blog post about how to do dependency injection with StructureMap. In this post we are going to learn Simple Injector IOC library and how we can do dependency injection with Simple Injector.
Simple Injector is a open source dependency injection library developed with C#. Followings are few characteristics of Simple Injector.
About Simple Injector:
- Simple Injector is very simple to use dependency injection library support .NET 4+ framework, Silverlight 4+, Windows Phone 8, Windows 8 Including Universal apps and Mono.
- Simple Injector is easily integrated with frameworks like ASP.NET Web Forms, ASP.NET MVC, ASP.NET Web API, WCF and many more.
- It’s free and always be free. Published under MIT license.
- Simple Injector is highly optimized for performance and concurrent use.
- Simple Injector is thread safe and lock free design.
- Simple Injector has great support for generics and used lot of things of generics then any other dependency injection libraries.
- Simple Injector has a powerful diagnostic system.Currently it offers following validations
- Lifestyle Mismatch
- Short Circuit Dependencies
- Potential Single Responsibility violations
- Container Register Types
- Simple Injector is amazingly fast.
- Simple Injector is developed using Modern proven development practices such as TDD and Solid Design Principals.