|
|
|
|
|
by sharpercoder
2051 days ago
|
|
That multiple usages of the same concrete types requires changes on multiple places. For small programs, the di container itself can probably be skipped (i.e. instantiate an object graph by newing up). For larger programs, this is too cumbersome and therefore error-inducing. |
|
Write a util function then, or like some like to call it, one of the many Factory pattern.