You typically do this in the module containing the implementations. The Unity container will be provided using dependency injection in the module's constructor; hence, the Shell never needs to actually register the implementations with the interface. The module containing the interfaces is usually an infrastructure DLL (and not a module), and hence can be referenced by the implementation modules.
Note that this is in line with Prism's recommendations regarding seperation of interface / implementation between DLLs. They go into it in some depth with respect to services; although I doubt you'll find any examples of them using it for models or other objects.
Example:
using Microsoft.Practices.Unity;
using YourInfrastructureDll;
public sealed class ModuleImplementationA : IModule
{
private readonly IUnityContainer _container;
public ModuleImplementationA(IUnityContainer container)
{
_container = container;
}
public void Initialize()
{
// IYourInterface is defined in the Infrastructure DLL, while YourImplementationA exists in this module
_container.RegisterType<IYourInterface, YourImplementationA>();
}
}
This can be swapped out with another implementation DLL:
using Microsoft.Practices.Unity;
using YourInfrastructureDll;
public sealed class ModuleImplementationB : IModule
{
private readonly IUnityContainer _container;
public ModuleImplementationB(IUnityContainer container)
{
_container = container;
}
public void Initialize()
{
// IYourInterface is defined in the Infrastructure DLL, while YourImplementationB exists in a different module than the first
_container.RegisterType<IYourInterface, YourImplementationB>();
}
}