I know that MEF currently supports downloading XAP files from a URI (which is awesome!), but does anyone know if it's possible to have MEF load a XAP from a byte array?
Thanks!
I know that MEF currently supports downloading XAP files from a URI (which is awesome!), but does anyone know if it's possible to have MEF load a XAP from a byte array?
Thanks!
Yes, this is in fact what DeploymentCatalog does. And since the source code to MEF is available (mef.codeplex.com), you can just refer to that. The code you are looking for is in src\Composition.Initialization\System\ComponentModel\Composition\Hosting\Package.cs. The LoadPackagedAssemblies takes a stream (of a XAP) and returns the assemblies in it.