ActionFilterAttribute 클래스

정의

동작 및 작업 결과의 실행을 비동기적으로 둘러싸는 추상 필터입니다. 서브클래스는 를 재정 OnActionExecuting(ActionExecutingContext)OnActionExecuted(ActionExecutedContext)OnActionExecutionAsync(ActionExecutingContext, ActionExecutionDelegate) 의해야 하지만 다른 두 클래스는 재정의하지 않아야 OnActionExecutionAsync(ActionExecutingContext, ActionExecutionDelegate) 합니다. 마찬가지로 서브클래스는 를 재정 OnResultExecuting(ResultExecutingContext)OnResultExecuted(ResultExecutedContext)OnResultExecutionAsync(ResultExecutingContext, ResultExecutionDelegate) 의해야 하지만 다른 두 클래스는 재정의하지 않아야 OnResultExecutionAsync(ResultExecutingContext, ResultExecutionDelegate) 합니다.

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
상속
ActionFilterAttribute
특성
구현

생성자

ActionFilterAttribute()

동작 및 작업 결과의 실행을 비동기적으로 둘러싸는 추상 필터입니다. 서브클래스는 를 재정 OnActionExecuting(ActionExecutingContext)OnActionExecuted(ActionExecutedContext)OnActionExecutionAsync(ActionExecutingContext, ActionExecutionDelegate) 의해야 하지만 다른 두 클래스는 재정의하지 않아야 OnActionExecutionAsync(ActionExecutingContext, ActionExecutionDelegate) 합니다. 마찬가지로 서브클래스는 를 재정 OnResultExecuting(ResultExecutingContext)OnResultExecuted(ResultExecutedContext)OnResultExecutionAsync(ResultExecutingContext, ResultExecutionDelegate) 의해야 하지만 다른 두 클래스는 재정의하지 않아야 OnResultExecutionAsync(ResultExecutingContext, ResultExecutionDelegate) 합니다.

속성

Order

필터 실행 순서를 결정하는 순서 값을 가져옵니다. 필터는 속성의 오름차순 숫자 값으로 Order 실행됩니다.

메서드

OnActionExecuted(ActionExecutedContext)

작업이 실행된 후 작업 결과 전에 호출됩니다.

OnActionExecuting(ActionExecutingContext)

모델 바인딩이 완료된 후 작업이 실행되기 전에 호출됩니다.

OnActionExecutionAsync(ActionExecutingContext, ActionExecutionDelegate)

모델 바인딩이 완료된 후 작업 전에 비동기적으로 호출됩니다.

OnResultExecuted(ResultExecutedContext)

작업 결과가 실행된 후 호출됩니다.

OnResultExecuting(ResultExecutingContext)

작업 결과가 실행되기 전에 호출됩니다.

OnResultExecutionAsync(ResultExecutingContext, ResultExecutionDelegate)

작업 결과 전에 비동기적으로 호출됩니다.

적용 대상