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


C# FubuRegistry.Assets方法代码示例

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


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

示例1: adds_a_warm_up_policy_for_asset_combinations

        public void adds_a_warm_up_policy_for_asset_combinations()
        {
            var registry = new FubuRegistry();
            registry.Assets().CombineAllUniqueAssetRequests();

            BehaviorGraph.BuildFrom(registry).Services.ServicesFor<IAssetPolicy>()
                .ShouldContain(x => x.Type == typeof(WarmUpSetsForCombinationPolicy));
        }
开发者ID:bobpace,项目名称:FubuMVC.Core.Assets,代码行数:8,代码来源:AssetExpressionUsageTester.cs

示例2: register_a_combination_policy_with_CombineWith

        public void register_a_combination_policy_with_CombineWith()
        {
            var registry = new FubuRegistry();
            registry.Assets()
                .CombineWith<CombineAllScriptFiles>()
                .CombineWith<CombineAllStylesheets>();

            BehaviorGraph.BuildFrom(registry).Services.ServicesFor(typeof(ICombinationPolicy))
                .Select(x => x.Type).ShouldHaveTheSameElementsAs(typeof(CombineAllScriptFiles), typeof(CombineAllStylesheets));
        }
开发者ID:bobpace,项目名称:FubuMVC.Core.Assets,代码行数:10,代码来源:AssetExpressionUsageTester.cs

示例3: apply_the_simplistic_asset_combination_approach

        public void apply_the_simplistic_asset_combination_approach()
        {
            var registry = new FubuRegistry();
            registry.Assets().CombineAllUniqueAssetRequests();

            BehaviorGraph.BuildFrom(registry).Services.DefaultServiceFor<ICombinationDeterminationService>()
                .Type.ShouldEqual(typeof(CombineAllUniqueSetsCombinationDeterminationService)); 


        }
开发者ID:bobpace,项目名称:FubuMVC.Core.Assets,代码行数:10,代码来源:AssetExpressionUsageTester.cs

示例4: register_a_custom_missing_asset_handler

        public void register_a_custom_missing_asset_handler()
        {
            var registry = new FubuRegistry();
            registry.Assets().HandleMissingAssetsWith<MyDifferentMissingAssetHandler>();

            BehaviorGraph.BuildFrom(registry).Services.DefaultServiceFor<IMissingAssetHandler>()
                .Type.ShouldEqual(typeof(MyDifferentMissingAssetHandler));
        }
开发者ID:bobpace,项目名称:FubuMVC.Core.Assets,代码行数:8,代码来源:AssetExpressionUsageTester.cs

示例5: YSOD_true

        public void YSOD_true()
        {
            var registry = new FubuRegistry();
            registry.Assets().YSOD_on_missing_assets(true);

            BehaviorGraph.BuildFrom(registry).Services.DefaultServiceFor<IMissingAssetHandler>()
                .Type.ShouldEqual(typeof(YellowScreenMissingAssetHandler));
        }
开发者ID:bobpace,项目名称:FubuMVC.Core.Assets,代码行数:8,代码来源:AssetExpressionUsageTester.cs

示例6: YSOD_false

        public void YSOD_false()
        {
            var registry = new FubuRegistry();
            registry.Assets().YSOD_on_missing_assets(false);

            BehaviorGraph.BuildFrom(x => x.Import<AssetBottleRegistration>()).Services.DefaultServiceFor<IMissingAssetHandler>()
                .Type.ShouldEqual(typeof (TraceOnlyMissingAssetHandler));
        }
开发者ID:bobpace,项目名称:FubuMVC.Core.Assets,代码行数:8,代码来源:AssetExpressionUsageTester.cs

示例7: should_register_the_recording_registration_as_a_policy_in_behavior_graph

        public void should_register_the_recording_registration_as_a_policy_in_behavior_graph()
        {
            var registry = new FubuRegistry();
            registry.Assets().Asset("a.js").Requires("b.js");

            var graph = BehaviorGraph.BuildFrom(registry);

            var registration = graph.Services.ServicesFor<IAssetPolicy>()
                .Single().Value.ShouldBeOfType<RecordingAssetRegistration>();

            var inner = MockRepository.GenerateMock<IAssetRegistration>();
            registration.Replay(inner);

            inner.AssertWasCalled(x => x.Dependency("a.js", "b.js"));
        }
开发者ID:bobpace,项目名称:FubuMVC.Core.Assets,代码行数:15,代码来源:AssetExpressionUsageTester.cs


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