本文整理汇总了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));
}
示例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));
}
示例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));
}
示例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));
}
示例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));
}
示例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));
}
示例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"));
}