共用方式為


ResultFilterAttribute 類別

定義

public ref class ResultFilterAttribute abstract : Attribute, 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 ResultFilterAttribute : Attribute, 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 ResultFilterAttribute = class
    inherit Attribute
    interface IResultFilter
    interface IFilterMetadata
    interface IAsyncResultFilter
    interface IOrderedFilter
[<System.AttributeUsage(System.AttributeTargets.Class | System.AttributeTargets.Method, AllowMultiple=true, Inherited=true)>]
type ResultFilterAttribute = class
    inherit Attribute
    interface IAsyncResultFilter
    interface IFilterMetadata
    interface IOrderedFilter
    interface IResultFilter
Public MustInherit Class ResultFilterAttribute
Inherits Attribute
Implements IAsyncResultFilter, IOrderedFilter, IResultFilter
繼承
ResultFilterAttribute
衍生
屬性
實作

建構函式

ResultFilterAttribute()

非同步括住動作結果執行的抽象篩選。 子類別必須覆寫 、 OnResultExecuted(ResultExecutedContext)OnResultExecutionAsync(ResultExecutingContext, ResultExecutionDelegate) ,但不能 OnResultExecutionAsync(ResultExecutingContext, ResultExecutionDelegate) 覆寫 OnResultExecuting(ResultExecutingContext) 其他兩個類別的其中一個。

屬性

Order

取得決定篩選準則執行順序的順序值。 篩選會以屬性的 Order 遞增數值執行。

方法

OnResultExecuted(ResultExecutedContext)

在動作結果執行之後呼叫。

OnResultExecuting(ResultExecutingContext)

在動作結果執行之前呼叫。

OnResultExecutionAsync(ResultExecutingContext, ResultExecutionDelegate)

在動作結果之前以非同步方式呼叫。

適用於