protected override bool Filter(Type type)
        {
            if (type.IsAbstract)
            {
                return(false);
            }

            return
                (ServicesControllerAttribute.IsPresentOn(type) ||
                 ServicesApiController.IsServicesController(type));
        }
示例#2
0
        private string GetRouteFromType(Type controllerType)
        {
            if (ServicesControllerAttribute.IsPresentOn(controllerType))
            {
                var name = _controllerNameGenerator.GetName(controllerType);

                return(string.Concat(_servicesConfiguration.Configuration.Services.Routes.RouteBase,
                                     name.Replace('.', '/')));
            }

            return("See Routes tab for details");
        }