Skip to content

A simple and lightweight IoC container implementation

Notifications You must be signed in to change notification settings

leonlehmann/LightweightIoC

Repository files navigation

LightweightIoC

A simple and lightweight IoC container implementation.

Example

 // Register a type
 TIoC.Container.RegisterType<IDrivable, TCar>
 
 // Register a type with a unique name
 TIoC.Container.RegisterType<IDrivable, TBicycle>('bicycle')
 
 // Resolve a component
 TIoC.Container.Resolve<IDrivable>
 
 // Resolve a component registered with a unique name
 TIoC.Container.Resolve<IDrivable>('bicycle')
 
 // Register a singleton instance
 TIoC.Container.RegisterSingleton<IDrivable>(TCar.Create)
 
 // Register a singleton instance with a unique name
 TIoC.Container.RegisterSingleton<IDrivable>(TCar.Create, 'car')

About

A simple and lightweight IoC container implementation

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages