Simple Injector

Igal Tabachnik edited this page Jul 24, 2013 · 4 revisions

Simple Injector is a very simple yet powerful container, created by Steven van Deursen (@dot_NET_Junkie). Many thanks to Steven for providing the test case data!

The following APIs are supported:

  • Register<IFoo, Foo>()
  • Register(typeof(IFoo), typeof(Foo))
  • RegisterSingle<Foo>()
  • RegisterAll<IFoo>(typeof(Foo), typeof(Foo2))
  • RegisterAll<IFoo>(new[] { typeof(Foo), typeof(Foo2) })
  • RegisterAll<IFoo>(new List<Type> { typeof(Foo), typeof(Foo2) })
  • RegisterDecorator(...)
  • RegisterSingleDecorator(...)
  • RegisterOpenGeneric(typeof(IRepository<>), typeof(Repository<,>))
  • RegisterSingleOpenGeneric(typeof(IRepository<>), typeof(Repository<,>))

Not yet supported

  • Lifestyle.CreateRegistration(...)