Skip to content

Latest commit

 

History

History
17 lines (14 loc) · 497 Bytes

File metadata and controls

17 lines (14 loc) · 497 Bytes

C# Inversion of Control

An IoC practice. Every commit gives the same output as the following:

> dotnet run
1. Pencil 1 - 100 - 200
2. Pencil 2 - 200 - 200
3. Pencil 3 - 300 - 200
4. Pencil 4 - 400 - 200
  • Commit 1: Dirty, tightly coupled code
  • Commit 2: Implement IoC using Factory Pattern
  • Commit 3: Implement Dependency Inversion by creating abstraction
  • Commit 4: Implement Dependency Injection
  • Commit 5: Implement Dependency Injection using DI container