public static List <object> ToArguments <T>(Expression <Action <T> > expression)
        {
            var parser = new MethodCallParser();

            parser.Visit(expression);

            return(parser.Arguments);
        }
Beispiel #2
0
        public string ReadRouteDataFromMethodArguments(Expression expression)
        {
            var arguments = MethodCallParser.ToArguments(expression);

            return("/" + _segments.Select(x => x.ReadRouteDataFromMethodArguments(arguments)).Join("/"));
        }