コード例 #1
0
 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
0
 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
0
        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
0
 public void Configure(FubuRegistry registry)
 {
     registry.Route("hello").Calls<RandomExtension>(x => x.SayHello());
 }
コード例 #5
0
 public void Configure(FubuRegistry registry)
 {
     registry.Route("_menu").Calls<MenuEndpoint>(x => x.MenuQuery(null));
 }