/// <summary> /// Creates a new the MVC controllers info /// </summary> /// <param name="namedType">The named type for the controller</param> /// <param name="actionFilter">The parse filter to use for the MVC action attribute</param> /// <param name="typeTable">The type table</param> internal MvcControllerInfo(INamedType namedType, TypeFilter actionFilter, TypeTable typeTable) { NamedType = namedType; foreach (IMethod method in namedType.Methods) { if (method.Attributes.Any(attrData => actionFilter.Evaluate(attrData.AttributeType))) { MvcActionInfo action = new MvcActionInfo(method, typeTable); _actions.Add(action); } } }
private IAttributeData GetDisplayNameAttr(TypeFilter dispNameParseFilter) { string dispNameProvider = typeof(IEnumDisplayNameProvider).FullName; foreach (IAttributeData attr in Field.Attributes) { if (dispNameParseFilter.Evaluate(attr.AttributeType)) { return(attr); } } return(null); }