Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I think you could probably just do this:</p> <pre><code>public class Bootstrapper : UnityBootstrapper { protected override void ConfigureContainer() { Container.RegisterType&lt;IProductModule&gt;(); base.ConfigureContainer(); } private static ObservableCollection&lt;IProductModule&gt; _productModules = new Obser...(); public static ObservableCollection&lt;IProductModule&gt; ProductModules { get { return _productModules; } } protected override IModuleCatalog GetModuleCatalog() { var modCatalog = new ModuleCatalog() .AddModule(typeof(ProductAModule)); //TODO: add all modules to ProductModules collection return modCatalog; } ... } </code></pre> <p>Then you would have a static property that anything could bind to directly, or could be used from your ViewModel.</p> <hr> <p>Here is how to get a list of module names that have been registered with the module catalog.</p> <pre><code>public class MyViewModel : ViewModel { public ObservableCollection&lt;string&gt; ModuleNames { ... } public MyViewModel(IModuleCatalog catalog) { ModuleNames = new ObservableCollection&lt;string&gt;(catalog.Modules.Select(mod =&gt; mod.ModuleName)); } } </code></pre> <p>That's pretty much it. <strong>IModuleCatalog and IModuleManager are the only things that are setup in the container</strong> for you to access in terms of the modules. As I said, though, <strong>you won't get any instance data because these modules (hopefully) are yet to be created</strong>. You can only access Type data.</p> <p>Hope this helps.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload