concept auto - registration in category .net

This is an excerpt from Manning's book Dependency Injection in .NET.
DI CONTAINERS tend to support two or three of the common configuration options shown in figure 3.5. A few don’t support AUTO-REGISTRATION and a single one also lacks support for CODE AS CONFIGURATION, whereas XML configuration is ubiquitous. Most allow you to mix several approaches in the same application.
Figure 3.5. The most common ways to configure a DI CONTAINER shown against dimensions of explicitness and the degree of binding
![]()
These three configuration options have different characteristics that make them useful in different situations. Both XML and CODE AS CONFIGURATION tend to be explicit because they require us to register each component individually. AUTO-REGISTRATION, on the other hand, is much more implicit because it uses conventions to register a set of components by a single rule.
When we use CODE AS CONFIGURATION, we compile the container configuration into an assembly, whereas XML configuration enables us to support late binding where we can change the configuration without recompiling the application. In that dimension, AUTO-REGISTRATION falls somewhere in the middle, because we can ask it to scan a single assembly known at compile time, or alternatively to scan all assemblies in a predefined folder.
AUTO-REGISTRATION is the ability to automatically register components in a container by scanning one or more assemblies for implementations of desired ABSTRACTIONS.