Ejemplo n.º 1
0
 public void each_IActionBehavior_is_wrapped_with_a_nested_container_behavior()
 {
     graph.VisitRoutes(x =>
     {
         x.Actions += (r, chain) =>
         {
             factory.BuildBehavior(new ServiceArguments(), chain.UniqueId).ShouldBeOfType
             <NestedStructureMapContainerBehavior>();
         };
     });
 }
Ejemplo n.º 2
0
 public IList<RouteBase> BuildRoutes(BehaviorGraph graph, IBehaviorFactory factory)
 {
     var routes = new List<RouteBase>();
     graph.VisitRoutes(x =>
     {
         x.Actions += (routeDef, chain) =>
         {
             var route = routeDef.ToRoute();
             route.RouteHandler = new FubuRouteHandler(factory, chain.UniqueId);
             routes.Add(route);
         };
     });
     return routes;
 }
Ejemplo n.º 3
0
 public IList<RouteBase> BuildRoutes(BehaviorGraph graph, IBehaviorFactory factory)
 {
     var routes = new List<RouteBase>();
     graph.VisitRoutes(x =>
     {
         x.BehaviorFilters += chain => !chain.IsPartialOnly;
         x.Actions += (routeDef, chain) =>
         {
             var route = routeDef.ToRoute();
             route.RouteHandler = new FubuRouteHandler(new BehaviorInvoker(factory, chain));
             routes.Add(route);
         };
     });
     return routes;
 }
Ejemplo n.º 4
0
        public IList <RouteBase> BuildRoutes(BehaviorGraph graph, IBehaviorFactory factory)
        {
            var routes = new List <RouteBase>();

            graph.VisitRoutes(x =>
            {
                x.Actions += (routeDef, chain) =>
                {
                    var route          = routeDef.ToRoute();
                    route.RouteHandler = new FubuRouteHandler(factory, chain.UniqueId);
                    routes.Add(route);
                };
            });
            return(routes);
        }
 public IList<RouteBase> BuildRoutes(BehaviorGraph graph, IBehaviorFactory factory)
 {
     var routes = new List<RouteBase>();
     graph.VisitRoutes(x =>
     {
         x.BehaviorFilters += chain => !chain.IsPartialOnly;
         x.Actions += (routeDef, chain) =>
         {
             var route = routeDef.ToRoute();
             var transportationRoute = new TransportationRoute(route, new BehaviorInvoker(factory, chain), chain.InputType());
             routes.Add(transportationRoute);
         };
     });
     return routes;
 }
Ejemplo n.º 6
0
        public IList <RouteBase> BuildRoutes(BehaviorGraph graph, IBehaviorFactory factory)
        {
            var routes = new List <RouteBase>();

            graph.VisitRoutes(x =>
            {
                x.BehaviorFilters += chain => !chain.IsPartialOnly;
                x.Actions         += (routeDef, chain) =>
                {
                    var route          = routeDef.ToRoute();
                    route.RouteHandler = new FubuRouteHandler(new BehaviorInvoker(factory, chain));
                    routes.Add(route);
                };
            });
            return(routes);
        }
Ejemplo n.º 7
0
 private void registerUrls(BehaviorGraph graph)
 {
     var builder = new UrlRegistryBuilder(_urls);
     graph.VisitRoutes(builder);
 }