In older versions of Prism I was able to do this from UnityBootstrapper class
protected override void ConfigureContainer()
{
base.ConfigureContainer();
Container.RegisterType<IViewDragService, ViewDragService>(new HierarchicalLifetimeManager());
}
What would be equivalent of this code for Prism 7 when unity container is used ?
You can use GetContainer
on the container abstraction you receive from prism to get the actual IUnityContainer
:
containerRegistry.GetContainer().RegisterType<IViewDragService, ViewDragService>(new HierarchicalLifetimeManager());