Quantcast
Channel: patterns & practices: Prism
Viewing all articles
Browse latest Browse all 1878

New Post: Module OnDemand=true doesn't work

$
0
0
Thanks Damian for your reply.

I don't like DirectoryModuleCatalog way to load all assemblies at the same time as it will bring bad performance. I seek a way to load module manually when it's needed.
Seems that the one way to make this is to use LoadModule as you said.

Here is another issue i encountered when using LoadModule, could you help take a look at it? Senario is below:

I output the assemble of one module in the same folder as the output of the shell app. However, i got error saying "Module ModuleHouseOwnerInfo was not found in this catalog" when using LoadModule with the module name as parameter.

in Bootstrapper.cs class:
    protected override void ConfigureAggregateCatalog()
    {
        base.ConfigureAggregateCatalog();

        this.AggregateCatalog.Catalogs.Add(new AssemblyCatalog(typeof(Bootstrapper).Assembly));
    }
The module class:
[ModuleExport(typeof(ModuleHouseOwnerInfo))]
public class ModuleHouseOwnerInfo : IModule
{
    [ImportingConstructor]
    public ModuleHouseOwnerInfo()
    {
    }
}

Viewing all articles
Browse latest Browse all 1878

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>