Pocket MEF CTP 8
I finally found the time for updating Pocket MEF to the CTP 8 version.
the new version is available on codeplex.
if you were using the previous version I encourage you to switch to this version.
this version is match closer to the full framework version bits and it is better testes.
What’s new on this version?
Pocket.ComponentModel.Initialization is now supported:
you can use the PartInitializer to satisfy your object without having instance of the container.
the difference from the Silverlight version is that the entry assembly is not part of the default container’s catalog.
the only default catalog is Parts relative directory which you can drop compostable assemblies without needs for custom setting.
the CompositionHost can be use for setting the default container (which is used by the PartInitializer)
see the following code snippet (place the initialization code at the start of the Main method):
the next major change of this version is the metadata support.
using strong typed metadata on the full framework version is using Reflection.Emit which is not supported on the Compact Framework.
to resolve this issue you should register a mapper that know how to convert the metadata into your strongly typed instance.
the mapper should implement the following interface:
use the following sample for registering the mapper into the framework:
to make the mapper creation task easier you can find code snippet that will help you with that task,
the code snippet available both as part of the source code and as separate download
Point of interest
if you living in Israel you can hear me speaking on MEF at the SDP