parent
99a534caed
commit
7a4872495b
|
@ -205,7 +205,7 @@ The `TestController`:
|
|||
|
||||
<!-- test via webBuilder.UseStartup<Startup>(); -->
|
||||
|
||||
Navigating to `https://localhost:5001/Test2/FilterTest2` runs the following code:
|
||||
Navigating to `https://localhost:5001/Test/FilterTest2` runs the following code:
|
||||
|
||||
* `TestController.OnActionExecuting`
|
||||
* `MySampleActionFilter.OnActionExecuting`
|
||||
|
@ -244,8 +244,8 @@ The 3 filters run in the following order:
|
|||
* `MySampleActionFilter.OnActionExecuting`
|
||||
* `MyAction2FilterAttribute.OnActionExecuting`
|
||||
* `Test2Controller.FilterTest2`
|
||||
* `MySampleActionFilter.OnActionExecuted`
|
||||
* `MyAction2FilterAttribute.OnResultExecuting`
|
||||
* `MyAction2FilterAttribute.OnResultExecuting`
|
||||
* `MySampleActionFilter.OnActionExecuted`
|
||||
* `Test2Controller.OnActionExecuted`
|
||||
|
||||
The `Order` property overrides scope when determining the order in which filters run. Filters are sorted first by order, then scope is used to break ties. All of the built-in filters implement `IOrderedFilter` and set the default `Order` value to 0. As mentioned previously, controller level filters set the [Order](https://github.com/dotnet/AspNetCore/blob/master/src/Mvc/Mvc.Core/src/Filters/ControllerActionFilter.cs#L15-L17) property to `int.MinValue` For built-in filters, scope determines order unless `Order` is set to a non-zero value.
|
||||
|
|
Loading…
Reference in New Issue