• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# ModuleCatalog类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中ModuleCatalog的典型用法代码示例。如果您正苦于以下问题:C# ModuleCatalog类的具体用法?C# ModuleCatalog怎么用?C# ModuleCatalog使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



ModuleCatalog类属于命名空间,在下文中一共展示了ModuleCatalog类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: GetModuleCatalog

        protected override IModuleCatalog GetModuleCatalog()
        {
            var catalog = new ModuleCatalog();
              catalog.AddModule(typeof(BugReportModule));

              return catalog;
        }
开发者ID:ZoolooDan,项目名称:bug-db-analyzer,代码行数:7,代码来源:Bootstrapper.cs


示例2: ModuleInUnreferencedAssemblyInitializedByModuleInitializer

        public void ModuleInUnreferencedAssemblyInitializedByModuleInitializer()
        {
            AssemblyCatalog assemblyCatalog = new AssemblyCatalog(GetPathToModuleDll());
            CompositionContainer compositionContainer = new CompositionContainer(assemblyCatalog);

            ModuleCatalog moduleCatalog = new ModuleCatalog();

            Mock<MefFileModuleTypeLoader> mockFileTypeLoader = new Mock<MefFileModuleTypeLoader>();

            compositionContainer.ComposeExportedValue<IModuleCatalog>(moduleCatalog);
            compositionContainer.ComposeExportedValue<MefFileModuleTypeLoader>(mockFileTypeLoader.Object);

            bool wasInit = false;
            var mockModuleInitializer = new Mock<IModuleInitializer>();
            mockModuleInitializer.Setup(x => x.Initialize(It.IsAny<ModuleInfo>())).Callback(() => wasInit = true);

            var mockLoggerFacade = new Mock<ILoggerFacade>();

            MefModuleManager moduleManager = new MefModuleManager(
                mockModuleInitializer.Object,
                moduleCatalog,
                mockLoggerFacade.Object);

            compositionContainer.SatisfyImportsOnce(moduleManager);

            moduleManager.Run();

            Assert.IsTrue(wasInit);
        }
开发者ID:ahszn,项目名称:Prism-4-with-WinForms,代码行数:29,代码来源:MefModuleManagerFixture.Desktop.cs


示例3: GetModuleCatalog

        protected override IModuleCatalog GetModuleCatalog()
        {
            var catalog = new ModuleCatalog();
            catalog.AddModule((typeof(MainModule)));

            return catalog;
        }
开发者ID:jfromaniello,项目名称:prismcontrib,代码行数:7,代码来源:Bootstrapper.cs


示例4: GetModuleCatalog

 protected override IModuleCatalog GetModuleCatalog()
 {
     var catalog = new ModuleCatalog();
     catalog.AddModule(typeof (EmployeeModule));
     catalog.AddModule(typeof (TimesheetModule));
     return catalog;
 }
开发者ID:changhongfu,项目名称:TDDKata,代码行数:7,代码来源:Bootstrapper.cs


示例5: CreateModuleCatalog

 protected override IModuleCatalog CreateModuleCatalog()
 {
     ModuleCatalog moduleCatalog = new ModuleCatalog();
     moduleCatalog.AddModule(typeof(AdminModule));
     moduleCatalog.AddModule(typeof(ArtistsModule));
     return moduleCatalog;
 }
开发者ID:CarlosVV,项目名称:mediavf,代码行数:7,代码来源:Bootstrapper.cs


示例6: UnknownExportedModuleIsAddedAndInitializedByModuleInitializer

        public void UnknownExportedModuleIsAddedAndInitializedByModuleInitializer()
        {
            var aggregateCatalog = new AggregateCatalog();
            var compositionContainer = new CompositionContainer(aggregateCatalog);

            var moduleCatalog = new ModuleCatalog();

            var mockModuleTypeLoader = new Mock<MefXapModuleTypeLoader>(new DownloadedPartCatalogCollection());

            compositionContainer.ComposeExportedValue<IModuleCatalog>(moduleCatalog);
            compositionContainer.ComposeExportedValue<MefXapModuleTypeLoader>(mockModuleTypeLoader.Object);

            bool wasInit = false;
            var mockModuleInitializer = new Mock<IModuleInitializer>();
            mockModuleInitializer.Setup(x => x.Initialize(It.IsAny<ModuleInfo>())).Callback(() => wasInit = true);

            var mockLoggerFacade = new Mock<ILoggerFacade>();

            var moduleManager =
                new MefModuleManager(mockModuleInitializer.Object, moduleCatalog, mockLoggerFacade.Object);

            aggregateCatalog.Catalogs.Add(new TypeCatalog(typeof(TestMefModule)));

            compositionContainer.SatisfyImportsOnce(moduleManager);

            moduleManager.Run();

            Assert.IsTrue(wasInit);
            Assert.IsTrue(moduleCatalog.Modules.Any(mi => mi.ModuleName == "TestMefModule"));
        }
开发者ID:CarlosVV,项目名称:mediavf,代码行数:30,代码来源:MefModuleManagerFixture.Silverlight.cs


示例7: CreateModuleCatalog

		protected override Microsoft.Practices.Prism.Modularity.IModuleCatalog CreateModuleCatalog()
		{
			ModuleCatalog catalog = new ModuleCatalog();
			catalog.AddModule(typeof(Module1.Module1));
			catalog.AddModule(typeof(Module2.Module2));
			return catalog;
		}
开发者ID:Motaz-Al-Zoubi,项目名称:xaml-sdk,代码行数:7,代码来源:Bootstrapper_SL.cs


示例8: CreateModuleCatalog

        protected override IModuleCatalog CreateModuleCatalog()
        {
            base.ConfigureModuleCatalog();

            ModuleCatalog modules = new ModuleCatalog();
            modules.AddModule(typeof(PriceGridModule));
            return modules;  
        }
开发者ID:dave111,项目名称:MockBondDemo,代码行数:8,代码来源:BondAppBootStrapper.cs


示例9: CreateModuleCatalog

 protected override Microsoft.Practices.Prism.Modularity.IModuleCatalog CreateModuleCatalog()
 {
     ModuleCatalog catalog = new ModuleCatalog();
     catalog.AddModule(typeof(IssueLib.IssueModule));
     catalog.AddModule(typeof(MapLib.MapModule));
     catalog.AddModule(typeof(NavigationLib.NavigationModule));
     return catalog;
 }
开发者ID:CrappySolutions,项目名称:UtbildningService,代码行数:8,代码来源:Bootstraper.cs


示例10: GetModuleCatalog

        protected override IModuleCatalog GetModuleCatalog()
        {
            var catalog = new ModuleCatalog();

            catalog.AddModule(typeof(AngelSystemModule));

            return catalog;
        }
开发者ID:erwilleke,项目名称:ocu.angellight.code,代码行数:8,代码来源:Bootstrapper.cs


示例11: CreateModuleCatalog

        /// <summary>
        /// Creates the <see cref="T:Microsoft.Practices.Prism.Modularity.IModuleCatalog" /> used by Prism.
        /// </summary>
        /// <returns></returns>
        /// <remarks>The base implementation returns a new ModuleCatalog.</remarks>
        protected override IModuleCatalog CreateModuleCatalog()
        {
            ModuleCatalog catalog = new ModuleCatalog();
            catalog.AddModule(typeof(NeurochipModule));
            catalog.AddModule(typeof(GhostModule));

            return catalog;
        }
开发者ID:rinoandrejohnsen,项目名称:Tachikoma,代码行数:13,代码来源:Bootstrapper.cs


示例12: GetModuleCatalog

        protected override IModuleCatalog GetModuleCatalog()
        {
            ModuleCatalog catalog = new ModuleCatalog()
                .AddModule(typeof(LoginModule))
                .AddModule(typeof(PleaseWaitModule))
                .AddModule(typeof(CompaniesListModule));

            return catalog;
        }
开发者ID:MarimerLLC,项目名称:csla,代码行数:9,代码来源:Bootstrapper.cs


示例13: CreateModuleCatalog

        protected override IModuleCatalog CreateModuleCatalog()
        {
            var moduleCatalog = new ModuleCatalog();
            // TODO: A more sofisticated method would 
            // be to get the modules from a Catalog.xaml file or a Web Service
            moduleCatalog.AddModule(typeof (BasicAccountModule.BasicAccountModule));

            return moduleCatalog;
        }
开发者ID:eatskolnikov,项目名称:QBank,代码行数:9,代码来源:MyBootstrapper.cs


示例14: GetModuleCatalog

 protected override IModuleCatalog GetModuleCatalog()
 {
     var moduleCatalog = new ModuleCatalog();
     foreach (var module in Container.GetAllInstances<IModule>())
     {
         moduleCatalog.AddModule(module.GetType());
     }
     return moduleCatalog;
 }
开发者ID:codeprogression,项目名称:Chinook-Media-Manager,代码行数:9,代码来源:Bootstrapper.cs


示例15: CreateModuleCatalog

        /// <summary>
        /// Populates the Module Catalog.
        /// </summary>
        /// <returns>A new Module Catalog.</returns>
        /// <remarks>
        /// This method uses the Module Discovery method of populating the Module Catalog. It requires
        /// a post-build event in each module to place the module assembly in the module catalog
        /// directory.
        /// </remarks>
        protected override IModuleCatalog CreateModuleCatalog()
        {
            var moduleCatalog = new ModuleCatalog();
            moduleCatalog.AddModule(typeof(SearchHelperModule));
            moduleCatalog.AddModule(typeof(ReportsModule));
            moduleCatalog.AddModule(typeof(AdminModule));

            return moduleCatalog;
        }
开发者ID:nagavitalp,项目名称:DialVijayawadaCode,代码行数:18,代码来源:Bootstrapper.cs


示例16: CanCreateCatalogFromList

        public void CanCreateCatalogFromList()
        {
            var moduleInfo = new ModuleInfo("MockModule", "type");
            List<ModuleInfo> moduleInfos = new List<ModuleInfo> { moduleInfo };

            var moduleCatalog = new ModuleCatalog(moduleInfos);

            Assert.AreEqual(1, moduleCatalog.Modules.Count());
            Assert.AreEqual(moduleInfo, moduleCatalog.Modules.ElementAt(0));
        }
开发者ID:CarlosVV,项目名称:mediavf,代码行数:10,代码来源:ModuleCatalogFixture.cs


示例17: RegisterModules

        /// <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);
        }
开发者ID:BillKrat,项目名称:Framework,代码行数:15,代码来源:Bootstrapper.cs


示例18: GetRegisteredModules

        public ModuleCatalog GetRegisteredModules()
        {
            // Register services before loading catalogs and regions
            ServicesRegistrator();

            var catalog = new ModuleCatalog();
            catalog.AddModule(typeof(NavigationModule));
            catalog.AddModule(typeof(HomeModule));
            catalog.AddModule(typeof(ArtistModule));
            catalog.AddModule(typeof(UserModule));

            return catalog;
        }
开发者ID:gricore,项目名称:GrigCorePlayer,代码行数:13,代码来源:ModuleRegistrator.cs


示例19: CreateModuleCatalog

        protected override Microsoft.Practices.Prism.Modularity.IModuleCatalog CreateModuleCatalog()
        {
            ModuleCatalog moduleCatalog = new ModuleCatalog();

            // this is the code responsible 
            // for adding Module1 to the application
            moduleCatalog.AddModule
            (
                typeof(Zieschang.Net.Projects.SLJiraClient.DashboardModule.Module)
            );

            return moduleCatalog;
        }
开发者ID:jzi96,项目名称:JiraClient.SL,代码行数:13,代码来源:Bootstrapper.cs


示例20: CreateModuleCatalog

        protected override IModuleCatalog CreateModuleCatalog()
        {
            var catalog = new ModuleCatalog();

            catalog.AddModule(typeof(MenuModule));
            catalog.AddModule(typeof(SettingsModule));
            catalog.AddModule(typeof(ManifestsModule));
            catalog.AddModule(typeof(TestResultsModule));
            catalog.AddModule(typeof(TestCollectionsModule));
            catalog.AddModule(typeof(CommandHelpModule));

            return catalog;
        }
开发者ID:MGetmanov,项目名称:Selenite,代码行数:13,代码来源:Bootstrapper.cs



注:本文中的ModuleCatalog类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# ModuleCompilationState类代码示例发布时间:2022-05-24
下一篇:
C# ModuleBuilder类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap