本文整理汇总了C#中FubuMVC.Core.FubuRegistry.Route方法的典型用法代码示例。如果您正苦于以下问题:C# FubuRegistry.Route方法的具体用法?C# FubuRegistry.Route怎么用?C# FubuRegistry.Route使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FubuMVC.Core.FubuRegistry
的用法示例。
在下文中一共展示了FubuRegistry.Route方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: setupActions
private BehaviorGraph setupActions()
{
var registry = new FubuRegistry();
registry.Route("a/m1").Calls<Action1>(a => a.M1());
registry.Route("a/m2").Calls<Action1>(a => a.M2());
registry.Route("b/m1").Calls<Action2>(b => b.M1());
registry.Route("b/m2").Calls<Action2>(b => b.M2());
return registry.BuildGraph();
}
示例2: setupActions
private BehaviorGraph setupActions()
{
var registry = new FubuRegistry();
registry.Route("a/m1").Calls<Action1>(a => a.M1());
registry.Route("a/m2").Calls<Action1>(a => a.M2());
registry.Route("b/m1").Calls<Action2>(b => b.M1());
registry.Route("b/m2").Calls<Action2>(b => b.M2());
registry.Route("c/m1async").Calls<Action3>(b => b.M1Async());
return BehaviorGraph.BuildFrom(registry);
}
示例3: Configure
public void Configure(FubuRegistry registry)
{
registry.Route("_fubu/getting_started").Calls<StartingController>(x => x.GettingStarted());
registry.Configure(graph =>
{
var chain = graph.FindHomeChain();
if (chain == null)
{
graph.BehaviorFor<StartingController>(x => x.GettingStarted()).Route = new RouteDefinition(string.Empty);
}
});
}
示例4: Configure
public void Configure(FubuRegistry registry)
{
registry.Route("hello").Calls<RandomExtension>(x => x.SayHello());
}
示例5: Configure
public void Configure(FubuRegistry registry)
{
registry.Route("_menu").Calls<MenuEndpoint>(x => x.MenuQuery(null));
}