简体   繁体   English

如何在运行时加载所有PRISM模块?

[英]How to load all the PRISM modules in runtime?

In the meanwhile, I was creating module catalogs to load the modules using Unity. 同时,我正在创建模块目录以使用Unity加载模块。 I've seen several applications which can load all the modules in a certain folder, I mean.. the application can load the modules in runtime. 我看过几个可以将所有模块加载到某个文件夹中的应用程序,我的意思是..该应用程序可以在运行时加载模块。

Is it possible to do this? 是否有可能做到这一点?

You just have på override the GetModuleCatalog method in the Bootstrapper and return a new DirectoryModuleCatalog. 您只需在Bootstrapper中覆盖GetModuleCatalog方法并返回一个新的DirectoryModuleCatalog。 See this question: Prism v4 Loading modules on demand with DirectoryModuleCatalog . 看到这个问题: Prism v4使用DirectoryModuleCatalog按需加载模块

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM