开发者

Can I discover a part from an assembly in the GAC using MEF?

I am just getting started with MEF and hoping to integrate it with an application I'm currently working on. I am wondering if it is possible in MEF to discover parts in assemblies that are in the GAC. Essentially I would like something similar to the DirectoryCatal开发者_C百科og but that would search the GAC. Is there anything like this out there?


I don't think there is anything like this out there. I don't think it's a good idea to do this, because it would mean loading each and every assembly in the GAC into your process.

If you want to do it anyway, the hard part is getting a list of assemblies in the GAC. After that you can just create an AssemblyCatalog for each one, and put all of the AssemblyCatalogs in a DirectoryCatalog.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜