Prism 6 - 将 ConfigurationModuleCatalog 与 DirectoryModuleCatalog 合并

Prism 6 - Merge ConfigurationModuleCatalog with DirectoryModuleCatalog

我最近在使用 Prism 6,并希望从 app.config 中引用核心模块(这样它们可以在将来被替换掉而无需重新编译……棱镜的全部意义所在!)。但是,我想将该功能添加到插件架构的扩展模块中,因此我想将 ConfigurationModuleCatalog 与 DirectoryModuleCatalog 对象合并以促进 "plugins" 目录。 我的问题: 有 "official" 的方法吗?我一直没能找到方法,但我的 Google 搜索词可能不正确!或者我是否必须通过在初始化时手动合并目录来将其组合在一起?

这很容易做到。此示例向您展示如何使用聚合目录

https://github.com/PrismLibrary/Prism-Samples-Wpf/tree/master/Modularity/ModularityWithUnity