Andrey Khataev
Andrey Khataev

Reputation: 1343

Force PRISM to use another instance of UnityContainer

I have UnityContainer in my app yet. Now I want to add use of PRISM to my app and I want PRISM to use my Container instead of its inner one defined in bootstrapper. Or I would also satisfied if I could create some kind of link between these two containers in order when I call MyContainer.Resolve() it could redirect this call to PRISM's container and resolve type that registered in PRISM, i.e RegionManager.

Thanks in advance!

Upvotes: 0

Views: 328

Answers (1)

gehho
gehho

Reputation: 9238

I think you only need to override the CreateContainer() method in your application's bootstrapper and return your own IUnityContainer:

protected override IUnityContainer CreateContainer()
{
    // return your container here...
}

Upvotes: 3

Related Questions