Im trying to determine if MEF (from codeplex) is right for my needs. I know MEF supports on-demand load开发者_如何学运维ing of Xap files. But does anybody know if it supports on-demand loading of silverlight libraries (dll's)?
Thanks.
The DeploymentCatalog makes it easy to download a XAP file. We don't have built in functionality to help downloading a DLL directly, but if you download it yourself and load it as an assembly (ie with Assembly.Load), you can use an AssemblyCatalog to create a catalog for that assembly that you can use with MEF.
Here's a modified version of the DeploymentCatalog that allows you to download either DLLs or XAPs.
http://pietschsoft.com/post/2010/10/22/Silverlight-Modify-MEF-to-load-plugins-from-DLL-and-XAP-files.aspx
This was so simple to add, it's a wonder why they didn't add it in the first place.
精彩评论