public override ILookup <string, HttpActionDescriptor> GetActionMapping(HttpControllerDescriptor controllerDescriptor)
        {
            if (controllerDescriptor.ControllerType == typeof(SlimApiGhostController))
            {
                var newActions = new List <HttpActionDescriptor>();
                foreach (var contrInfo in _apiConfig.ControllerInfos)
                {
                    var methods = contrInfo.TypeInfo.GetMethods(BindingFlags.Instance | BindingFlags.Public | BindingFlags.DeclaredOnly);
                    foreach (var method in methods)
                    {
                        var dtype = method.DeclaringType;
                        if (dtype == typeof(object)) //skip ToString()
                        {
                            continue;
                        }
                        var action = new SlimApiActionDescriptor(controllerDescriptor, method, contrInfo, _apiConfig);
                        if (action.RouteTemplates.Count > 0 && action.SupportedHttpMethods.Count > 0)
                        {
                            RegisterAction(action);
                            newActions.Add(action);
                        }
                    }
                } //foreach ct

                var lkp = newActions.ToLookup(a => a.ActionName, StringComparer.OrdinalIgnoreCase);
                return(lkp);
            }
            // otherwise call base
            return(base.GetActionMapping(controllerDescriptor));
        }
        private void RegisterAction(SlimApiActionDescriptor action)
        {
            List <SlimApiActionDescriptor> routeActions;

            foreach (var route in action.RouteTemplates)
            {
                if (!_actions.TryGetValue(route, out routeActions))
                {
                    routeActions = new List <SlimApiActionDescriptor>();
                    _actions.Add(route, routeActions);
                }
                routeActions.Add(action);
            }
        }