本文整理汇总了C#中FubuMVC.Core.FubuRegistry.BehaviorFor方法的典型用法代码示例。如果您正苦于以下问题:C# FubuRegistry.BehaviorFor方法的具体用法?C# FubuRegistry.BehaviorFor怎么用?C# FubuRegistry.BehaviorFor使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FubuMVC.Core.FubuRegistry
的用法示例。
在下文中一共展示了FubuRegistry.BehaviorFor方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: with_no_other_explicit_action_discovery
public void with_no_other_explicit_action_discovery()
{
var graph = new FubuRegistry(x =>
{
}).BuildGraph();
graph.BehaviorFor<MyEndpoint>(x => x.Go()).ShouldNotBeNull();
graph.BehaviorFor<MyEndpoints>(x => x.Go()).ShouldNotBeNull();
graph.BehaviorFor<MyEndpoints>(x => x.Go2()).ShouldNotBeNull();
}
示例2: does_not_find_endpoints_with_an_explicit_action_discovery_policy
public void does_not_find_endpoints_with_an_explicit_action_discovery_policy()
{
var graph = new FubuRegistry(x =>
{
x.Actions.FindWith(new FakeActionSource());
}).BuildGraph();
graph.BehaviorFor<MyEndpoint>(x => x.Go()).ShouldBeNull();
graph.BehaviorFor<MyEndpoints>(x => x.Go()).ShouldBeNull();
graph.BehaviorFor<MyEndpoints>(x => x.Go2()).ShouldBeNull();
}
示例3: does_not_find_endpoints_with_an_explicit_action_discovery
public void does_not_find_endpoints_with_an_explicit_action_discovery()
{
var graph = new FubuRegistry(x =>
{
x.Actions.IncludeClassesSuffixedWithController();
}).BuildGraph();
graph.BehaviorFor<MyEndpoint>(x => x.Go()).ShouldBeNull();
graph.BehaviorFor<MyEndpoints>(x => x.Go()).ShouldBeNull();
graph.BehaviorFor<MyEndpoints>(x => x.Go2()).ShouldBeNull();
}
示例4: will_find_endpoints_if_endpoint_is_explictly_specified_too
public void will_find_endpoints_if_endpoint_is_explictly_specified_too()
{
var graph = new FubuRegistry(x =>
{
x.Actions.FindWith(new FakeActionSource());
x.Actions.IncludeClassesSuffixedWithEndpoint();
}).BuildGraph();
graph.BehaviorFor<MyEndpoint>(x => x.Go()).ShouldNotBeNull();
graph.BehaviorFor<MyEndpoints>(x => x.Go()).ShouldNotBeNull();
graph.BehaviorFor<MyEndpoints>(x => x.Go2()).ShouldNotBeNull();
}
示例5: SetUp
public void SetUp()
{
BehaviorGraph behaviorGraph = new FubuRegistry().BuildGraph();
theContentCache = behaviorGraph.Services.DefaultServiceFor<IAssetContentCache>()
.Value.ShouldBeOfType<AssetContentCache>();
theChain = behaviorGraph.BehaviorFor<AssetWriter>(x => x.Write(null));
}
示例6: SetUp
public void SetUp()
{
var graph = new FubuRegistry(x =>
{
x.Actions.IncludeType<MethodAction>();
}).BuildGraph();
theChain = graph.BehaviorFor<MethodAction>(x => x.Get_cases_from_Start_to_End(null));
}