I am referring to Robert C. Martins book "Clean Architecture" on the top of page 318.
There he states:
In the ports and adapters approach, the
Ordersinterfaces have inbound dependencies from other packages, so they need to be made
public. Again, the implementation classes can be made
package protectedand dependency injected at runtime.
I fully understand the intention of making more components package protected rather than public.
My question is, how can the implementations be made
package protected (
internal in C#) if they should be dependency injected? How should the composition root access these types to register them with the IoC container?
Or is there a difference between
package protected in Java and
internal in C#?
Or maybe I am misinterpreting his statement?