Example #1
0
    /// <summary>
    /// Ensures that modules from the App code assembly are registered.
    /// </summary>
    private static void EnsureDynamicModules(object sender, EventArgs e)
    {
        // Ensures CMSModuleLoader module, which has IsDiscoverable set to false
        ModuleEntryManager.EnsureModule <CMSModuleLoader>();

        // Ensures other possible modules within app code assembly
        ModuleEntryManager.EnsureAppCodeModules(typeof(CMSModuleLoader).Assembly);
    }
Example #2
0
    /// <summary>
    /// Ensures that modules from the App code assembly are registered.
    /// </summary>
    private static void EnsureDynamicModules(object sender, EventArgs e)
    {
        ModuleEntryManager.EnsureModule <CMSModuleLoader>();

        var discovery = new ModuleDiscovery();
        var assembly  = typeof(CMSModuleLoader).Assembly;

        foreach (var module in discovery.GetModules(assembly))
        {
            ModuleEntryManager.EnsureModule(module);
        }
    }