/// <summary> /// The configure module catalog. /// </summary> protected override void ConfigureModuleCatalog() { var moduleCatalog = new NuGetBasedModuleCatalog { AllowPrereleaseVersions = true, }; // Module A is defined from NuGet. moduleCatalog.AddModule(new ModuleInfo("ModuleA", "ModularityWithCatel.Desktop.ModuleA, ModularityWithCatel.Desktop.ModuleA") { Ref = "ModularityWithCatel.Desktop.ModuleA" }); // Module C is defined from NuGet. moduleCatalog.AddModule(new ModuleInfo("ModuleC", "ModularityWithCatel.Desktop.ModuleC, ModularityWithCatel.Desktop.ModuleC") { Ref = "ModularityWithCatel.Desktop.ModuleC", InitializationMode = InitializationMode.OnDemand }); ModuleCatalog.Add(moduleCatalog); // Module B and Module D are copied to a directory as part of a post-build step. // These modules are not referenced in the project and are discovered by inspecting a directory. // Both projects have a post-build step to copy themselves into that directory. var directoryCatalog = new DirectoryModuleCatalog { ModulePath = @".\DirectoryModules" }; ModuleCatalog.Add(directoryCatalog); // Module E and Module F are defined in configuration. var configurationCatalog = new ConfigurationModuleCatalog(); ModuleCatalog.Add(configurationCatalog); }
/// <summary> /// 4. Registers the modules for application use /// </summary> /// <param name="catalog">The catalog.</param> protected override void RegisterModules(ModuleCatalog catalog) { catalog .Add<CategoryModule>() .Add<PasswordModule>() .Add<LoginModule>() // Last module is visible ; // Register module(s) with framework base.RegisterModules(catalog); }
protected override void ConfigureModuleCatalog() { base.ConfigureModuleCatalog(); ModuleCatalog.Add <HostModule>(); ModuleCatalog.Add <ShellModule>(); ModuleCatalog.Define <SettingsModule>() .DependsOn <ShellModule>() .Add(); #if FAKE ModuleCatalog.Add <FakeModule>(); ModuleCatalog.Define <AccountModules>() .DependsOn <FakeModule>() .Add(); ModuleCatalog.Define <ConnectivityModules>() .DependsOn <FakeModule>() .Add(); #else //TODO: Eventually this should move out to configuration that will be updated by Nuget packages. -LC ModuleCatalog.Add <BluetoothModule>(); ModuleCatalog.Define <AccountModules>() //.DependsOn<AccModulesGoHere>() .Add(); ModuleCatalog.Define <ConnectivityModules>() .DependsOn <BluetoothModule>() .Add(); #endif ModuleCatalog.Define <DashboardModule>() .DependsOn <ShellModule>() .DependsOn <SettingsModule>() .Add(); ModuleCatalog.Define <WelcomeModule>() .DependsOn <SettingsModule>() .DependsOn <AccountModules>() .DependsOn <ConnectivityModules>() .Add(); ModuleCatalog.Define <Toolbar.ToolbarModule>() .DependsOn <SettingsModule>() .DependsOn <AccountModules>() .DependsOn <ConnectivityModules>() .Add(); }
protected override void CreateModuleCatalog() { base.CreateModuleCatalog(); ModuleCatalog.Add(typeof(SingleViewModule <MvpVmPresenter <HomeView, HomeViewModel> >)); }