当前位置: 首页>>代码示例>>C#>>正文


C# ModuleCatalog类代码示例

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


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


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