1
Vote

Add ActionName support

description

Modified library as so ...
 
.OrderBy(x => x.Route.Order == -1).ThenBy(x => x.Route.Order).ToList().ForEach(x =>
            {
                var action_name = x.Method.GetCustomAttributes(typeof(ActionNameAttribute),false).FirstOrDefault() as ActionNameAttribute;
                //if (attrib != null)
                //{
                //    var arg = (CodeAttributeArgument)attrib.Arguments.Item(1);
                //    ActionNameValueExpression = arg.Value;
                //}
 
                // Set Defautls
                var defaults = ParseRouteValues(x.Route.Defaults);
                defaults.Add("controller", x.Controller);
                defaults.Add("action", action_name != null ? action_name.Name : x.Action);

comments