singleton B initializes singleton A. singleton A has no knowledge of B. How can we use A and be sure that B has done its initialization routine first?
B and A are in different assemblies and are maintained by different teams.
Trying to keep the implementations completely seperate.
The best answer seems to be just don’t. Here’s what I’m thinking thought:
kick off the initialisation via a registration class that implements a certain interface. If a DoSomething gets called, and T is in an assembly we haven’t seen before, then we search for a class with the given IRegistration interface.
So… that would get rid of the dependency. It’d use reflection. We’d have to look up the types assembly home each time a method got called, but not too high a price to pay perhaps
The level of coupling that your question implies leaves me in serious doubt as to the quality of your design.