Prism v4 Loading modules on demand with DirectoryModuleCatalog

前端 未结 1 980
一个人的身影
一个人的身影 2021-01-22 12:47

In my bootstrapper I have the following code to create my Directory ModuleCatalog

protected override IModuleCatalog CreateModuleCatalog()
{
    DirectoryModuleCa         


        
1条回答
  •  粉色の甜心
    2021-01-22 13:18

    I don't remember the exact name, but in Prism v2 there were attributes that were placed on classes that implemented IModule to mark the modules to load on demand.

    Check the Prism docs for their name.

    EDIT: Just checked the Prism code. The class name for the attribute is ModuleAttribute and the usage is the following:

    [Module(ModuleName = "MyModule", OnDemand = true)]
    public class MyModule : IModule
    {
       ...
    }
    

    Thanks, Damian

    0 讨论(0)
提交回复
热议问题