Class AutoValidateAntiforgeryTokenAttribute
[AttributeUsage(AttributeTargets.Class|AttributeTargets.Method, AllowMultiple = false, Inherited = true)]
public class AutoValidateAntiforgeryTokenAttribute : Attribute
- Inheritance
-
objectAttributeAutoValidateAntiforgeryTokenAttribute
Properties
IsReusable
Gets a value that indicates if the result of Microsoft.AspNetCore.Mvc.Filters.IFilterFactory.CreateInstance(System.IServiceProvider) can be reused across requests.
public bool IsReusable { get; }
Property Value
- bool
Order
Gets the order value for determining the order of execution of filters. Filters execute in ascending numeric value of the Microsoft.AspNetCore.Mvc.Filters.IOrderedFilter.Order property.
public int Order { get; set; }
Property Value
- int
Remarks
Filters are executed in an ordering determined by an ascending sort of the Microsoft.AspNetCore.Mvc.Filters.IOrderedFilter.Order property.
Asynchronous filters, such as Microsoft.AspNetCore.Mvc.Filters.IAsyncActionFilter, surround the execution of subsequent filters of the same filter kind. An asynchronous filter with a lower numeric Microsoft.AspNetCore.Mvc.Filters.IOrderedFilter.Order value will have its filter method, such as Microsoft.AspNetCore.Mvc.Filters.IAsyncActionFilter.OnActionExecutionAsync(Microsoft.AspNetCore.Mvc.Filters.ActionExecutingContext, Microsoft.AspNetCore.Mvc.Filters.ActionExecutionDelegate), executed before that of a filter with a higher value of Microsoft.AspNetCore.Mvc.Filters.IOrderedFilter.Order.
Synchronous filters, such as Microsoft.AspNetCore.Mvc.Filters.IActionFilter, have a before-method, such as Microsoft.AspNetCore.Mvc.Filters.IActionFilter.OnActionExecuting(Microsoft.AspNetCore.Mvc.Filters.ActionExecutingContext), and an after-method, such as Microsoft.AspNetCore.Mvc.Filters.IActionFilter.OnActionExecuted(Microsoft.AspNetCore.Mvc.Filters.ActionExecutedContext). A synchronous filter with a lower numeric Microsoft.AspNetCore.Mvc.Filters.IOrderedFilter.Order value will have its before-method executed before that of a filter with a higher value of Microsoft.AspNetCore.Mvc.Filters.IOrderedFilter.Order. During the after-stage of the filter, a synchronous filter with a lower numeric Microsoft.AspNetCore.Mvc.Filters.IOrderedFilter.Order value will have its after-method executed after that of a filter with a higher value of Microsoft.AspNetCore.Mvc.Filters.IOrderedFilter.Order.
If two filters have the same numeric value of Microsoft.AspNetCore.Mvc.Filters.IOrderedFilter.Order, then their relative execution order is determined by the filter scope.
Methods
CreateInstance(IServiceProvider)
Creates an instance of the executable filter.
public IFilterMetadata CreateInstance(IServiceProvider serviceProvider)
Parameters
serviceProvider
IServiceProviderThe request System.IServiceProvider.
Returns
- IFilterMetadata
An instance of the executable filter.