IResultFilter Interface
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.
A filter that surrounds execution of action results successfully returned from an action.
public interface class IResultFilter : Microsoft::AspNetCore::Mvc::Filters::IFilterMetadata
public interface IResultFilter : Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata
type IResultFilter = interface
interface IFilterMetadata
Public Interface IResultFilter
Implements IFilterMetadata
- Derived
- Implements
Remarks
IResultFilter and IAsyncResultFilter implementations are executed around the action result only when the action method (or action filters) complete successfully.
IResultFilter and IAsyncResultFilter instances are not executed in cases where an authorization filter or resource filter short-circuits the request to prevent execution of the action. IResultFilter. IResultFilter and IAsyncResultFilter implementations are also not executed in cases where an exception filter handles an exception by producing an action result.
To create a result filter that surrounds the execution of all action results, implement either the IAlwaysRunResultFilter or the IAsyncAlwaysRunResultFilter interface.
Methods
OnResultExecuted(ResultExecutedContext) |
Called after the action result executes. |
OnResultExecuting(ResultExecutingContext) |
Called before the action result executes. |