Exemplo n.º 1
0
        public static bool GetApiShow(System.Web.Http.Controllers.HttpControllerDescriptor actionContext, string project)
        {
            string prefix = "";
            var    obj    = actionContext.GetCustomAttributes <System.Web.Http.RoutePrefixAttribute>();

            if (obj != null)
            {
                foreach (System.Web.Http.RoutePrefixAttribute md in obj)
                {
                    prefix = md.Prefix;
                }
            }
            return(prefix.ToLower().Contains(project.ToLower()));
        }