|
What is the difference between a CompositionPoint and an ExtensionPoint? |
|
The difference relates to the fact that MEF can be used for both IoC (assembling your application out of known pars) and extensibility (assembling your application out of unknown parts). So CompositionPoints are for things that are provided by the framework or application, but could potentially be removed and replace by another module offering the same interface. ExtensionPoints are places where you can plug-in extensions. In a practical sense, CompositionPoints use an MEF Import attribute (looking for exactly one instance) and ExtensionPoints use an MEF ImportMany attribute (looking for zero to many instances). |
Can you mark my answer as correct (the checkmark) so I can have a karma of more than 1? :)