コード例 #1
0
ファイル: App.xaml.cs プロジェクト: ellisnet/CodeBrix-Samples
        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));
        }
コード例 #2
0
 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);
 }