ActionFilterAttribute Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
An abstract filter that asynchronously surrounds execution of the action and the action result. Subclasses should override OnActionExecuting(ActionExecutingContext), OnActionExecuted(ActionExecutedContext) or OnActionExecutionAsync(ActionExecutingContext, ActionExecutionDelegate) but not OnActionExecutionAsync(ActionExecutingContext, ActionExecutionDelegate) and either of the other two. Similarly subclasses should override OnResultExecuting(ResultExecutingContext), OnResultExecuted(ResultExecutedContext) or OnResultExecutionAsync(ResultExecutingContext, ResultExecutionDelegate) but not OnResultExecutionAsync(ResultExecutingContext, ResultExecutionDelegate) and either of the other two.
public ref class ActionFilterAttribute abstract : Attribute, Microsoft::AspNetCore::Mvc::Filters::IActionFilter, Microsoft::AspNetCore::Mvc::Filters::IAsyncActionFilter, Microsoft::AspNetCore::Mvc::Filters::IAsyncResultFilter, Microsoft::AspNetCore::Mvc::Filters::IOrderedFilter, Microsoft::AspNetCore::Mvc::Filters::IResultFilter
[System.AttributeUsage(System.AttributeTargets.Class | System.AttributeTargets.Method, AllowMultiple=true, Inherited=true)]
public abstract class ActionFilterAttribute : Attribute, Microsoft.AspNetCore.Mvc.Filters.IActionFilter, Microsoft.AspNetCore.Mvc.Filters.IAsyncActionFilter, Microsoft.AspNetCore.Mvc.Filters.IAsyncResultFilter, Microsoft.AspNetCore.Mvc.Filters.IOrderedFilter, Microsoft.AspNetCore.Mvc.Filters.IResultFilter
[<System.AttributeUsage(System.AttributeTargets.Class | System.AttributeTargets.Method, AllowMultiple=true, Inherited=true)>]
type ActionFilterAttribute = class
inherit Attribute
interface IActionFilter
interface IFilterMetadata
interface IAsyncActionFilter
interface IResultFilter
interface IAsyncResultFilter
interface IOrderedFilter
[<System.AttributeUsage(System.AttributeTargets.Class | System.AttributeTargets.Method, AllowMultiple=true, Inherited=true)>]
type ActionFilterAttribute = class
inherit Attribute
interface IActionFilter
interface IFilterMetadata
interface IAsyncActionFilter
interface IAsyncResultFilter
interface IOrderedFilter
interface IResultFilter
Public MustInherit Class ActionFilterAttribute
Inherits Attribute
Implements IActionFilter, IAsyncActionFilter, IAsyncResultFilter, IOrderedFilter, IResultFilter
- Inheritance
-
ActionFilterAttribute
- Attributes
- Implements
Constructors
ActionFilterAttribute() |
Properties
Order |
Gets the order value for determining the order of execution of filters. Filters execute in ascending numeric value of the Order property. |
Methods
OnActionExecuted(ActionExecutedContext) |
Called after the action executes, before the action result. |
OnActionExecuting(ActionExecutingContext) |
Called before the action executes, after model binding is complete. |
OnActionExecutionAsync(ActionExecutingContext, ActionExecutionDelegate) |
Called asynchronously before the action, after model binding is complete. |
OnResultExecuted(ResultExecutedContext) |
Called after the action result executes. |
OnResultExecuting(ResultExecutingContext) |
Called before the action result executes. |
OnResultExecutionAsync(ResultExecutingContext, ResultExecutionDelegate) |
Called asynchronously before the action result. |