Esempio n. 1
0
        private void AddHandlerForAction(RouteHandler routes, HttpMethodAttribute att, MethodInfo info)
        {
            Routing.Action action = ActionForMethod (info);

            ActionTarget target = new ActionTarget (action);

            string[] patterns = null == att.Patterns ? new string [] { "/" + info.Name } : att.Patterns;

            AddImplicitRouteHandlerForTarget (target, OpsForPatterns (patterns, att.MatchType), att.Methods);
        }
Esempio n. 2
0
        private void AddDefaultHandlerForAction(RouteHandler routes, MethodInfo info)
        {
            Routing.Action action = ActionForMethod (info);

            ActionTarget target = new ActionTarget (action);
            AddImplicitRouteHandlerForTarget (target, new string [] { "/" + info.Name }, HttpMethods.RouteMethods, MatchType.String);
        }