A software engineer with 4+ years of experience who loves working with JavaScript and loves refactoring to the point that I look weekly into old codebase of mine and refactor some parts of it!
The way I understand Dependency injection is that you have an injection pool ( map of classes that you would inject ) and the injector injects such classes from its pool whenever its needed. They are not singletons by nature they are normal classes that gets injected, I'm not certian if this is the case in C# because I normally don't use it.
There are lots of implementations of dependency injection but in most of them it allows you to inject an instance of a class more than once ( meaning there will be more than one instance not a single one ) this indicates that simple DI does not inject singletons. This is how for example Angular implements it
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
The way I understand Dependency injection is that you have an injection pool ( map of classes that you would inject ) and the injector injects such classes from its pool whenever its needed. They are not singletons by nature they are normal classes that gets injected, I'm not certian if this is the case in C# because I normally don't use it.
There are lots of implementations of dependency injection but in most of them it allows you to inject an instance of a class more than once ( meaning there will be more than one instance not a single one ) this indicates that simple DI does not inject singletons. This is how for example Angular implements it