Reusable components using MEF

Dec 13, 2009 at 3:24 PM

Hi,

how should one design a reuseable component using MEF regarding the possibility that the client-application may use some additionally components that also MEF. Should each component have it's own container or should a global container get shared between those components? The latter one could improve perforance, as it prevents that the assemblies are scanned for imports and exports multiple times (one time by each container). On the other side, it increases complexity and makes it more difficult to configure the container due to it's global character.

What would you suggest?

Regards,

Manfred