*I have an application which uses an IOC container (Autofac, but could be any).
I also have modules which are developed externally. Each module needs to specify its own setup of the DI container, defining Repositories, Services specific to its module.
At deployment, these modules are then manually registered with Autofac via XML configuration.
Normally if each module wanted to request an instance of a Type from the IOC container we could use a ServiceLocator pattern. This decouples each module from the specific IOC container type, e.g. Autofac/Unity/StructureMap/etc.
But I want to decouple each module from the IOC container at the point of registration. For example when doing the container.Register().As();
All of the IOC containers have different methods to almost achieve the same thing, so I'm wondering if there is a standard pattern for it.
Update: I'm specifically looking for a way to agnosticise the Registering of types rather than the Resolving of type instances.