public override void OnActionExecuting(ActionExecutingContext filterContext)
{
//获得Controller的特性
var controllerSkip = (filterContext.ActionDescriptor as ControllerActionDescriptor).MethodInfo.ReflectedType.GetCustomAttributes(typeof(SkipLoginAttribute), true).Length;
//获取action的特性
var actionSkip = (filterContext.ActionDescriptor as ControllerActionDescriptor).MethodInfo.GetCustomAttributes(typeof(SkipLoginAttribute), true).Length;
//获得Controller的特性
var test1 = (filterContext.ActionDescriptor as ControllerActionDescriptor).MethodInfo.ReflectedType.CustomAttributes.Where(c=>c.AttributeType==typeof(SkipLoginAttribute)).Count();
//获取action的特性
var test2 = (filterContext.ActionDescriptor as ControllerActionDescriptor).MethodInfo.CustomAttributes.Where(c => c.AttributeType == typeof(SkipLoginAttribute)).Count();
//获取controller名称
var controllerName = (string)filterContext.RouteData.Values["controller"];
//获取action名称
var actionName = (string)filterContext.RouteData.Values["action"];
}