Table of Contents

Class NonActionAttribute

Namespace
System.Web.Mvc
Assembly
System.Web.Mvc.dll

Represents an attribute that is used to indicate that a controller method is not an action method.

[AttributeUsage(AttributeTargets.Method, AllowMultiple = false, Inherited = true)]
public sealed class NonActionAttribute : ActionMethodSelectorAttribute
Inheritance
NonActionAttribute
Inherited Members

Constructors

NonActionAttribute()

Initializes a new instance of the NonActionAttribute class.

public NonActionAttribute()

Methods

IsValidForRequest(ControllerContext, MethodInfo)

Determines whether the attribute marks a method that is not an action method by using the specified controller context.

public override bool IsValidForRequest(ControllerContext controllerContext, MethodInfo methodInfo)

Parameters

controllerContext ControllerContext

The controller context.

methodInfo MethodInfo

The method information.

Returns

bool

true if the attribute marks a valid non-action method; otherwise, false.