An explanation about ChildContainer - ExportFactory - CompositionScopeDefinition

Feb 27, 2012 at 10:06 PM

Hi,

It will be very helpful if you can please publish more articles about the different capabilities of ChildContainer, ExportFactory and CompositionScopeDefinition.

What each of them is designed to solve and how can they be utilized to work together.

I'm looking at it for a WPF application in which I have navigation system and I'm looking to use one of them to control the lifetime of a screen as long and the client is using it but it's still not clear which one is the best fit.

 

Thank you,

Ido.

Feb 28, 2012 at 4:59 PM

Thanks for the suggestion. More information on these topics would certainly be useful, we’ll keep that in mind.

To offer a quick summary for your scenario:

· CSD/ExportFactory<T> are the preferred first choice, especially for desktop scenarios

· Child containers are the more flexible choice, but require more effort to use well and have some quirks when ImportMany finds the same part in both a parent and a child container (duplicate instances can appear)

Hope this helps.

Nick

From: ido_ran [email removed]
Sent: Monday, February 27, 2012 2:07 PM
To: Nicholas Blumhardt
Subject: An explanation about ChildContainer - ExportFactory - CompositionScopeDefinition [MEF:346473]

From: ido_ran

Hi,

It will be very helpful if you can please publish more articles about the different capabilities of ChildContainer, ExportFactory and CompositionScopeDefinition.

What each of them is designed to solve and how can they be utilized to work together.

I'm looking at it for a WPF application in which I have navigation system and I'm looking to use one of them to control the lifetime of a screen as long and the client is using it but it's still not clear which one is the best fit.

Thank you,

Ido.

Jun 5, 2013 at 5:00 PM
I'm looking for a more detailed post but haven't found anything yet apart from the simple example on the BCL blog. I have asked a question about how to us CompositionScopeDefinition on stackoverflow.

http://stackoverflow.com/questions/16943121/defining-scope-in-mef-with-compositionscopedefinition