protected override void RegisterTypes(ICodeBrixContainer container) { container.RegisterForNavigation <MainPage>(); container.RegisterForNavigation <TabA, TabViewModel>(); container.RegisterForNavigation <TabB, TabViewModel>(); container.RegisterForNavigation <TabC, TabViewModel>(); container.RegisterSingleton(new ApplicationCommands(), typeof(IApplicationCommands)); }
public static void RegisterModule <T>(this ICodeBrixContainer container, ICodeBrixModuleInfo <T> moduleInfo) where T : ICodeBrixModule { container.RegisterSingleton(new ObjectFactory(moduleInfo.ModuleType, true, moduleInfo.Settings), moduleInfo.ModuleType, moduleInfo.ModuleName); (container as CodeBrixContainer)?.ModuleCatalog?.AddModule(moduleInfo.ModuleInfo); }