Defines values that specify the order in which ASP.NET MVC filters run within the same filter type and filter order.
Assembly: System.Web.Mvc (in System.Web.Mvc.dll)
public enum FilterScope
public enum class FilterScope
Public Enumeration FilterScope
Specifies an order before Last and after Controller.
Specifies an order before Action and after Global.
Specifies an order before Controller and after First.
The ASP.NET MVC framework supports the following types of filters:
Authorization filters, which implement the IAuthorizationFilter interface.
Action filters, which implement the IActionFilter interface.
Response filters, which implement the IResultFilter interface.
Exception filters, which implement the IExceptionFilter interface.
Filters run in the order listed — for example, authorization filters run first and exception filters run last. Within each filter type, the Order value specifies the run order. Within each filter type and order, the Scope value specifies the order for filters. This enumeration defines the following filter scope values (in the order in which they run):
For example, an action filter that has the Order property set to zero and filter scope set to First runs before an action filter that has the Order property set to zero and filter scope set to Action.
The execution order of filters that have the same type, order and scope is undefined.
Return to top