Which parts of MEF should be customized for dynamic loading of plug-ins in a distributed application

家住魔仙堡 提交于 2019-12-02 01:20:25
Petrik

It turns out that MEF is missing certain bits that are required for the delay loading of plug-in assemblies, however it is possible to use some parts of MEF in the plug-in part of the application.

  • Delay loading of the components is done by implementing a handler for the AppDomain.AssemblyResolve event. This resolver uses the existing communication capabilities (which are necessary to communicate between the host application and the dataset application) to transfer the desired assemblies.
  • Scanning and serialization of plugin data is implemented as explained in the answer to the relevant question. This part heavily uses MEF to do the detection and serialization of the plug-in data.
  • Composing the parts without instantiating the objects seems to not be possible in MEF so this section of the application is implemented as as per the implementation provided by this answer
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!