Skip to content
This repository was archived by the owner on Dec 9, 2022. It is now read-only.
This repository was archived by the owner on Dec 9, 2022. It is now read-only.

Ignore NonAction Methods #80

@hernangm

Description

@hernangm

As per http://msdn.microsoft.com/en-us/library/system.web.mvc.nonactionattribute(v=vs.118).aspx, it would be reasonable to exclude nonaction methods.

I think it would suffice to change:

    internal static bool IsValidActionMethod(this MethodInfo methodInfo, bool allowActionMethodsReturningVoid)
    {
        return
            methodInfo.ReturnType.IsControllerActionReturnType(allowActionMethodsReturningVoid) &&
            !methodInfo.GetCustomAttributes(typeof(NonActionAttribute), false).Any() &&
            !methodInfo.IsSpecialName &&
            !methodInfo.IsDeclaredBy<Controller>();
    }

NOT TESTED. If the feature is accepted, I can modify this.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions