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


C# FubuRegistry.WithSparkDefaults方法代码示例

本文整理汇总了C#中FubuMVC.Core.FubuRegistry.WithSparkDefaults方法的典型用法代码示例。如果您正苦于以下问题:C# FubuRegistry.WithSparkDefaults方法的具体用法?C# FubuRegistry.WithSparkDefaults怎么用?C# FubuRegistry.WithSparkDefaults使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在FubuMVC.Core.FubuRegistry的用法示例。


在下文中一共展示了FubuRegistry.WithSparkDefaults方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: configures_settings_with_default_assemblies_and_namespaces

        public void configures_settings_with_default_assemblies_and_namespaces()
        {
            var registry = new FubuRegistry();
            registry.WithSparkDefaults();

            SparkSettings settings = null;
            registry.Services(x =>
                              	{
                              		settings = (SparkSettings) x.DefaultServiceFor<ISparkSettings>().Value;
                              	});

            registry.BuildGraph();

            settings
                .UseAssemblies
                .ShouldContain(typeof(HtmlTag).Assembly.FullName);

            settings
                .UseAssemblies
                .ShouldContain(typeof(FubuPageExtensions).Assembly.FullName);

            settings
                .UseNamespaces
                .ShouldContain(typeof(FubuRegistryExtensions).Namespace);

            settings
                .UseNamespaces
                .ShouldContain(typeof(FubuPageExtensions).Namespace);

            settings
                .UseNamespaces
                .ShouldContain(typeof(HtmlTag).Namespace);
        }
开发者ID:RobertTheGrey,项目名称:fubumvc,代码行数:33,代码来源:SparkRegistrationTester.cs

示例2: registers_spark_view_factory

        public void registers_spark_view_factory()
        {
            var registry = new FubuRegistry();
            registry.WithSparkDefaults();

            ISparkViewFactory factory = null;
            registry.Services(x =>
                              	{
                                    factory = (ISparkViewFactory)x.DefaultServiceFor<ISparkViewFactory>().Value;
                              	});

            registry.BuildGraph();

            factory.ShouldNotBeNull();
        }
开发者ID:RobertTheGrey,项目名称:fubumvc,代码行数:15,代码来源:SparkRegistrationTester.cs

示例3: first_configuration_supercedes_second

        public void first_configuration_supercedes_second()
        {
            var registry = new FubuRegistry();
            registry.Spark(spark => spark.Settings.AddNamespace("Test"));
            registry.WithSparkDefaults();

            SparkSettings settings = null;
            registry.Services(x =>
                              	{
                              		settings = (SparkSettings) x.DefaultServiceFor<ISparkSettings>().Value;
                              	});

            registry.BuildGraph();

            settings
                .UseNamespaces
                .ShouldContain("Test");
        }
开发者ID:RobertTheGrey,项目名称:fubumvc,代码行数:18,代码来源:SparkRegistrationTester.cs

示例4: registers_spark_view_renderer

        public void registers_spark_view_renderer()
        {
            var registry = new FubuRegistry();
            registry.WithSparkDefaults();

            var hasRenderer = false;
            registry.Services(x => x.Each((type, def) =>
                                          	{
                              		       		if(type == typeof(ISparkViewRenderer<>))
                              		       		{
                              		       			hasRenderer = def.Type == typeof (SparkViewRenderer<>);
                              		       		}
                                          	}));

            registry.BuildGraph();

            hasRenderer.ShouldBeTrue();
        }
开发者ID:RobertTheGrey,项目名称:fubumvc,代码行数:18,代码来源:SparkRegistrationTester.cs


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