开发者

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 c开发者_Python百科reate 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!


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...
}
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜