Microsoft.AspNetCore.Mvc.Filters Namespace¶
-
namespace
Microsoft.AspNetCore.Mvc.
Filters
¶ Interfaces
- interface
IActionFilter
- A filter that surrounds execution of the action.
- interface
IAsyncActionFilter
- A filter that asynchronously surrounds execution of the action, after model binding is complete.
- interface
IAsyncAuthorizationFilter
- A filter that asynchronously confirms request authorization.
- interface
IAsyncExceptionFilter
- A filter that runs asynchronously after an action has thrown an
System.Exception
. - interface
IAsyncResourceFilter
- A filter that asynchronously surrounds execution of model binding, the action (and filters) and the action result (and filters).
- interface
IAsyncResultFilter
- A filter that asynchronously surrounds execution of the action result.
- interface
IAuthorizationFilter
- A filter that confirms request authorization.
- interface
IExceptionFilter
- A filter that runs after an action has thrown an
System.Exception
. - interface
IFilterContainer
- A filter that requires a reference back to the
Microsoft.AspNetCore.Mvc.Filters.IFilterFactory
that created it. - interface
IFilterFactory
- An interface for filter metadata which can create an instance of an executable filter.
- interface
IFilterMetadata
- Marker interface for filters handled in the MVC request pipeline.
- interface
IFilterProvider
- A
Microsoft.AspNetCore.Mvc.Filters.FilterItem
provider. Implementations should updateMicrosoft.AspNetCore.Mvc.Filters.FilterProviderContext.Results
to make executable filters available. - interface
IOrderedFilter
- A filter that specifies the relative order it should run.
- interface
IResourceFilter
- A filter that surrounds execution of model binding, the action (and filters) and the action result (and filters).
- interface
IResultFilter
- A filter that surrounds execution of the action result.
Classes
- class
ActionExecutedContext
- A context for action filters, specifically
Microsoft.AspNetCore.Mvc.Filters.IActionFilter.OnActionExecuted(Microsoft.AspNetCore.Mvc.Filters.ActionExecutedContext)
calls. - class
ActionExecutingContext
- A context for action filters, specifically
Microsoft.AspNetCore.Mvc.Filters.IActionFilter.OnActionExecuted(Microsoft.AspNetCore.Mvc.Filters.ActionExecutedContext)
andMicrosoft.AspNetCore.Mvc.Filters.IAsyncActionFilter.OnActionExecutionAsync(Microsoft.AspNetCore.Mvc.Filters.ActionExecutingContext,Microsoft.AspNetCore.Mvc.Filters.ActionExecutionDelegate)
calls. - class
ActionFilterAttribute
- An abstract filter that asynchronously surrounds execution of the action and the action result. Subclasses
should override
Microsoft.AspNetCore.Mvc.Filters.ActionFilterAttribute.OnActionExecuting(Microsoft.AspNetCore.Mvc.Filters.ActionExecutingContext)
,Microsoft.AspNetCore.Mvc.Filters.ActionFilterAttribute.OnActionExecuted(Microsoft.AspNetCore.Mvc.Filters.ActionExecutedContext)
orMicrosoft.AspNetCore.Mvc.Filters.ActionFilterAttribute.OnActionExecutionAsync(Microsoft.AspNetCore.Mvc.Filters.ActionExecutingContext,Microsoft.AspNetCore.Mvc.Filters.ActionExecutionDelegate)
but notMicrosoft.AspNetCore.Mvc.Filters.ActionFilterAttribute.OnActionExecutionAsync(Microsoft.AspNetCore.Mvc.Filters.ActionExecutingContext,Microsoft.AspNetCore.Mvc.Filters.ActionExecutionDelegate)
and either of the other two. Similarly subclasses should overrideMicrosoft.AspNetCore.Mvc.Filters.ActionFilterAttribute.OnResultExecuting(Microsoft.AspNetCore.Mvc.Filters.ResultExecutingContext)
,Microsoft.AspNetCore.Mvc.Filters.ActionFilterAttribute.OnResultExecuted(Microsoft.AspNetCore.Mvc.Filters.ResultExecutedContext)
orMicrosoft.AspNetCore.Mvc.Filters.ActionFilterAttribute.OnResultExecutionAsync(Microsoft.AspNetCore.Mvc.Filters.ResultExecutingContext,Microsoft.AspNetCore.Mvc.Filters.ResultExecutionDelegate)
but notMicrosoft.AspNetCore.Mvc.Filters.ActionFilterAttribute.OnResultExecutionAsync(Microsoft.AspNetCore.Mvc.Filters.ResultExecutingContext,Microsoft.AspNetCore.Mvc.Filters.ResultExecutionDelegate)
and either of the other two. - class
AuthorizationFilterContext
- A context for authorization filters i.e.
Microsoft.AspNetCore.Mvc.Filters.IAuthorizationFilter
andMicrosoft.AspNetCore.Mvc.Filters.IAsyncAuthorizationFilter
implementations. - class
ExceptionContext
- A context for exception filters i.e.
Microsoft.AspNetCore.Mvc.Filters.IExceptionFilter
andMicrosoft.AspNetCore.Mvc.Filters.IAsyncExceptionFilter
implementations. - class
ExceptionFilterAttribute
- An abstract filter that runs asynchronously after an action has thrown an
System.Exception
. Subclasses must overrideMicrosoft.AspNetCore.Mvc.Filters.ExceptionFilterAttribute.OnException(Microsoft.AspNetCore.Mvc.Filters.ExceptionContext)
orMicrosoft.AspNetCore.Mvc.Filters.ExceptionFilterAttribute.OnExceptionAsync(Microsoft.AspNetCore.Mvc.Filters.ExceptionContext)
but not both. - class
FilterCollection
- class
FilterContext
- An abstract context for filters.
- class
FilterDescriptor
- Descriptor for an
Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata
. - class
FilterItem
- Used to associate executable filters with
Microsoft.AspNetCore.Mvc.Filters.IFilterMetadata
instances as part ofMicrosoft.AspNetCore.Mvc.Filters.FilterProviderContext
. AnMicrosoft.AspNetCore.Mvc.Filters.IFilterProvider
should inspectMicrosoft.AspNetCore.Mvc.Filters.FilterProviderContext.Results
and setMicrosoft.AspNetCore.Mvc.Filters.FilterItem.Filter
andMicrosoft.AspNetCore.Mvc.Filters.FilterItem.IsReusable
as appropriate. - class
FilterProviderContext
- A context for filter providers i.e.
Microsoft.AspNetCore.Mvc.Filters.IFilterProvider
implementations. - class
FilterScope
- <p> Contains constant values for known filter scopes. </p> <p> Scope defines the ordering of filters that have the same order. Scope is by-default defined by how a filter is registered. </p>
- class
ResourceExecutedContext
- A context for resource filters, specifically
Microsoft.AspNetCore.Mvc.Filters.IResourceFilter.OnResourceExecuted(Microsoft.AspNetCore.Mvc.Filters.ResourceExecutedContext)
calls. - class
ResourceExecutingContext
- A context for resource filters, specifically
Microsoft.AspNetCore.Mvc.Filters.IResourceFilter.OnResourceExecuting(Microsoft.AspNetCore.Mvc.Filters.ResourceExecutingContext)
andMicrosoft.AspNetCore.Mvc.Filters.IAsyncResourceFilter.OnResourceExecutionAsync(Microsoft.AspNetCore.Mvc.Filters.ResourceExecutingContext,Microsoft.AspNetCore.Mvc.Filters.ResourceExecutionDelegate)
calls. - class
ResultExecutedContext
- A context for result filters, specifically
Microsoft.AspNetCore.Mvc.Filters.IResultFilter.OnResultExecuted(Microsoft.AspNetCore.Mvc.Filters.ResultExecutedContext)
calls. - class
ResultExecutingContext
- A context for result filters, specifically
Microsoft.AspNetCore.Mvc.Filters.IResultFilter.OnResultExecuting(Microsoft.AspNetCore.Mvc.Filters.ResultExecutingContext)
andMicrosoft.AspNetCore.Mvc.Filters.IAsyncResultFilter.OnResultExecutionAsync(Microsoft.AspNetCore.Mvc.Filters.ResultExecutingContext,Microsoft.AspNetCore.Mvc.Filters.ResultExecutionDelegate)
calls. - class
ResultFilterAttribute
- An abstract filter that asynchronously surrounds execution of the action result. Subclasses
must override
Microsoft.AspNetCore.Mvc.Filters.ResultFilterAttribute.OnResultExecuting(Microsoft.AspNetCore.Mvc.Filters.ResultExecutingContext)
,Microsoft.AspNetCore.Mvc.Filters.ResultFilterAttribute.OnResultExecuted(Microsoft.AspNetCore.Mvc.Filters.ResultExecutedContext)
orMicrosoft.AspNetCore.Mvc.Filters.ResultFilterAttribute.OnResultExecutionAsync(Microsoft.AspNetCore.Mvc.Filters.ResultExecutingContext,Microsoft.AspNetCore.Mvc.Filters.ResultExecutionDelegate)
but notMicrosoft.AspNetCore.Mvc.Filters.ResultFilterAttribute.OnResultExecutionAsync(Microsoft.AspNetCore.Mvc.Filters.ResultExecutingContext,Microsoft.AspNetCore.Mvc.Filters.ResultExecutionDelegate)
and either of the other two.
Delegates
- delegate
ActionExecutionDelegate
- A delegate that asynchronously returns an
Microsoft.AspNetCore.Mvc.Filters.ActionExecutedContext
indicating the action or the next action filter has executed. - delegate
ResourceExecutionDelegate
- A delegate that asynchronously returns a
Microsoft.AspNetCore.Mvc.Filters.ResourceExecutedContext
indicating model binding, the action, the action’s result, result filters, and exception filters have executed. - delegate
ResultExecutionDelegate
- A delegate that asynchronously returns an
Microsoft.AspNetCore.Mvc.Filters.ResultExecutedContext
indicating the action result or the next result filter has executed.
- interface