ActionFilterAttribute クラス
定義
重要
一部の情報は、リリース前に大きく変更される可能性があるプレリリースされた製品に関するものです。 Microsoft は、ここに記載されている情報について、明示または黙示を問わず、一切保証しません。
アクションの実行とアクションの結果を非同期的に囲む抽象フィルター。 サブクラスは、 をOnActionExecuted(ActionExecutedContext)オーバーライドするOnActionExecutionAsync(ActionExecutingContext, ActionExecutionDelegate)必要がありますが、それ以外の 2 つはオーバーライドOnActionExecuting(ActionExecutingContext)しないでくださいOnActionExecutionAsync(ActionExecutingContext, ActionExecutionDelegate)。 同様に、サブクラスは、 をOnResultExecuted(ResultExecutedContext)オーバーライドするOnResultExecutionAsync(ResultExecutingContext, ResultExecutionDelegate)必要がありますが、それ以外の 2 つのどちらかをオーバーライドOnResultExecuting(ResultExecutingContext)する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() |
アクションの実行とアクションの結果を非同期的に囲む抽象フィルター。 サブクラスは、 をOnActionExecuted(ActionExecutedContext)オーバーライドするOnActionExecutionAsync(ActionExecutingContext, ActionExecutionDelegate)必要がありますが、それ以外の 2 つはオーバーライドOnActionExecuting(ActionExecutingContext)しないでくださいOnActionExecutionAsync(ActionExecutingContext, ActionExecutionDelegate)。 同様に、サブクラスは、 をOnResultExecuted(ResultExecutedContext)オーバーライドするOnResultExecutionAsync(ResultExecutingContext, ResultExecutionDelegate)必要がありますが、それ以外の 2 つのどちらかをオーバーライドOnResultExecuting(ResultExecutingContext)するOnResultExecutionAsync(ResultExecutingContext, ResultExecutionDelegate)必要があります。 |
プロパティ
Order |
フィルターの実行順序を決定するための順序値を取得します。 フィルターは、 プロパティの昇順の数値で Order 実行されます。 |
メソッド
OnActionExecuted(ActionExecutedContext) |
アクションの実行後、アクションの結果の前に呼び出されます。 |
OnActionExecuting(ActionExecutingContext) |
モデル バインドが完了した後、アクションが実行される前に呼び出されます。 |
OnActionExecutionAsync(ActionExecutingContext, ActionExecutionDelegate) |
モデル バインドが完了した後、アクションの前に非同期的に呼び出されます。 |
OnResultExecuted(ResultExecutedContext) |
アクションの結果の実行後に呼び出されます。 |
OnResultExecuting(ResultExecutingContext) |
アクション結果の実行前に呼び出されます。 |
OnResultExecutionAsync(ResultExecutingContext, ResultExecutionDelegate) |
アクションの結果の前に非同期的に呼び出されます。 |