The two common mechanisms for creating dependency injection bindings, such as through an IOC container, is from an XML configuration or a block of imperative code. In these cases, the key value pair is explicit (i.e. key = requested type, value = returned type).
Still, there is a third "heuristic" approach where an application/IOC container is given only [IMyClass] keys and the container then reflects over a set of application assembly dependencies to find all name-matched concrete classes [MyClass]. Said differently, the "return type" values are discovered rather than declared.
What I'd like to know is twofold:
- Which IOC containers (or other late-binding tools) permit the heuristic approach? Does this approach have a more common name?
- Are there other binding techniques, besides the three I've listed, which are used in practice?