Skip to content

Latest commit

 

History

History
11 lines (8 loc) · 344 Bytes

README.md

File metadata and controls

11 lines (8 loc) · 344 Bytes

injector

Represents a simple implementation of DI (dependencies injector).

Using:

// registering dependencies:
Injector.Register(() => new CoffeeMachine()).AsSingleInstance();
Injector.Register(() => new Developer(Injector.Resolve<CoffeeMachine>()));

// resolving dependencies:
var dev = Injector.Resolve<Developer>();