4

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 ?

Milos
  • 1,353
  • 2
  • 18
  • 37

1 Answers1

4

You can use GetContainer on the container abstraction you receive from prism to get the actual IUnityContainer:

containerRegistry.GetContainer().RegisterType<IViewDragService, ViewDragService>(new HierarchicalLifetimeManager());
Haukinger
  • 10,420
  • 2
  • 15
  • 28