/// <summary> /// 获取当前Action的权限角色名称 /// </summary> /// <param name="x"></param> /// <returns></returns> public static string GetRoleName(this ActionDescriptor x) { return(x.GetFullName().Replace("Controllers", string.Empty) .Replace("Controller", string.Empty).Replace(".", string.Empty)); }