public override FilterInfo GetFilters()
        {
            // For simplicity, we only consider filters on XxxAsync() since it is the entry point to the action

            // Enumerable.OrderBy() is a stable sort, so this method preserves scope ordering.
            FilterAttribute[]      typeFilters    = (FilterAttribute[])ActionMethod.ReflectedType.GetCustomAttributes(typeof(FilterAttribute), true /* inherit */);
            FilterAttribute[]      methodFilters  = (FilterAttribute[])ActionMethod.GetCustomAttributes(typeof(FilterAttribute), true /* inherit */);
            List <FilterAttribute> orderedFilters = typeFilters.Concat(methodFilters).OrderBy(attr => attr.Order).ToList();

            FilterInfo filterInfo = new FilterInfo();

            MergeFiltersIntoList(orderedFilters, filterInfo.ActionFilters);
            MergeFiltersIntoList(orderedFilters, filterInfo.AuthorizationFilters);
            MergeFiltersIntoList(orderedFilters, filterInfo.ExceptionFilters);
            MergeFiltersIntoList(orderedFilters, filterInfo.ResultFilters);
            return(filterInfo);
        }
 public override ICollection <ActionSelector> GetSelectors()
 {
     ActionMethodSelectorAttribute[] attrs = (ActionMethodSelectorAttribute[])ActionMethod.GetCustomAttributes(typeof(ActionMethodSelectorAttribute), true /* inherit */);
     ActionSelector[] selectors            = Array.ConvertAll(attrs, attr => (ActionSelector)(controllerContext => attr.IsValidForRequest(controllerContext, ActionMethod)));
     return(selectors);
 }
 public override object[] GetCustomAttributes(Type attributeType, bool inherit)
 {
     return(ActionMethod.GetCustomAttributes(attributeType, inherit));
 }
 public override object[] GetCustomAttributes(bool inherit)
 {
     return(ActionMethod.GetCustomAttributes(inherit));
 }