user158360
user158360

Reputation: 21

Unity in Prism using WPF

In Prism can we have another instance of unity at module level to register the classes in a particular module.so that i will not load the application level unity with so many classes in different modules.

Upvotes: 2

Views: 1001

Answers (2)

Ehsan Zargar Ershadi
Ehsan Zargar Ershadi

Reputation: 24833

The answer in NO. You can't , it's against Unity infrastructure.

Upvotes: 0

Anderson Imes
Anderson Imes

Reputation: 25640

I think what you are looking for is a scoped unity container. Here's an article on it: http://blogs.microsoft.co.il/blogs/gilf/archive/2008/07/26/using-unity-container-hierarchies.aspx

This would allow your users to get all of the types registered in the "Parent" container, but also allow them to add their own without affecting the "Parent" container.

HTH, Anderson

Upvotes: 2

Related Questions