Suppose we have a package foos
containing classes, which all of them implements some IFoo
.
We also have a class, Baz
which contains a data-member, List<IFoo> fooList
.
Is it possible to inject dynamically all those IFoo
classes into fooList
?
By the way, is it a common practice? (I'm new with the DI concept)