Execution Order for the ApiController
Execution Order for the ApiController
Assuming the request goes into the ApiController scope, the operation order is as below:
- The
ExecuteAsync
method of theApiController
is invoked. - The
Initialize
method of theApiController
is invoked. - The registered Action Selector is retrieved.
- The
SelectAction
method of the registered action selector is invoked. If only one action method is matched, the pipeline continues. - All registered Filters for the selected action is retrieved.
- The Authorization Filters are called. The authorization filter can decide either to let the pipeline to continue executing or to terminate the pipeline.
- If Authorization Filters didn't terminate the request, action parameter bindings are performed.
ApiController.ModelState
is set.- Action Filters are invoked. The Action Filters can decide either to let the pipeline to continue executing or terminate the pipeline.
- If Action Filters didn't terminate the request, registered Action Invoker is retrieved.
- The
InvokeActionAsync
method of the registered Action Invoker is called to invoked the selected action method. - Note: If any exception occurs from the execution of the Authorization Filters to the execution of the action method, the exception filters are be called.
There are a few more things which happen in between but this is very close to a complete view. Check out the ApiController
source code for more information.
实际使用来看
2019-02-25 16:16:17.668+08:00 INFO [59]: CustomMessageHandler.SendAsync
2019-02-25 16:16:18.107+08:00 INFO [59]: BaseApiController.Initialize
Execution Order for the ApiController的更多相关文章
- Execution Order of Event Functions
In Unity scripting, there are a number of event functions that get executed in a predetermined order ...
- unity 脚本执行顺序设置 Script Execution Order Settings
通过Edit->Project Settings->Script Execution Order打开MonoManager面板 或者选择任意脚本在Inspector视图中点击Execu ...
- Unity3D Script Execution Order ——Question
我 知道 Monobehaviour 上的 那些 event functions 是 在主线程 中 按 顺序调用的.这点从Manual/ExecutionOrder.html 上的 一张图就可以看出来 ...
- Test execution order
刚开始的时候,JUnit并没有规定测试方法的调用执行顺序.方法通过映射的API返回的顺序进行调用.然 而,使用JVM顺序是不明智的,因为Java平台没有规定任何特定的顺序,事实上JDK7或多或少的返回 ...
- Execution Order In a Test Plan
1.Config Element 2.Pre Processors 3.Timer 4.Sampler 5.Post Processors 6.Assertions 7.Listener
- How to define Servlet filter order of execution using annotations
If we define Servlet filters in web.xml, then the order of execution of the filters will be the same ...
- System and method for parallel execution of memory transactions using multiple memory models, including SSO, TSO, PSO and RMO
A data processor supports the use of multiple memory models by computer programs. At a device extern ...
- Unity性能优化(2)-官方教程Diagnosing performance problems using the Profiler window翻译
本文是Unity官方教程,性能优化系列的第二篇<Diagnosing performance problems using the Profiler window>的简单翻译. 相关文章: ...
- Unity中脚本的执行顺序总结(@WhiteTaken)
(Editor)以上是Unity官方文档中的截图,脚本在被挂载到物体上,会启用Editor的方法Reset. (Initialization)当执行脚本开始,初始化的过程中,依次执行的是Awake-& ...
随机推荐
- FZU 2082(过路费)
题目链接:传送门 题目大意:中文题,略 题目思路:树链剖分(注意要把边上的权值转移到深度较大的点上来维护) 最后当top[x]==top[y]注意id[x]+1因为是维护的点而题目是边 如果不+可能会 ...
- 【BZOJ3470】Freda’s Walk 概率与期望
[BZOJ3470]Freda’s Walk Description 雨后的Poetic Island空气格外清新,于是Freda和Rainbow出来散步. Poetic Island的交通可以看作一 ...
- 神兽保佑-代码无BUG
┏┓ ┏┓┏┛┻━━━┛┻┓┃ ┃ ┃ ━ ┃┃ ┳┛ ┗┳ ┃┃ ┃┃ ┻ ┃┃ ┃┗━┓ ┏━┛ ┃ ┃ 神兽保佑 ┃ ┃ 代码无BUG! ┃ ┗━━━┓ ┃ ┣┓ ...
- Nginx配置文件(nginx.conf)配置详解[转]
转自:http://blog.csdn.net/tjcyjd/article/details/50695922 重新学习,发觉这篇文章写得很详细就摘录了! Nginx的配置文件nginx.conf配置 ...
- angular -- ng-ui-route路由及其传递参数?page页面版
前面有说过 ng-ui-route 使用 script 标签来做,但是很多时候,会通过引入模板页面的方式来实现: 具体代码: <!DOCTYPE html> <html lang=& ...
- 奇怪的Visual Studio 2013停止响应问题
昨天开始遭遇这个问题,今天再次遭遇. 疑似问题发生在写代码的窗口中复制/粘贴时(有待进一步确认触发条件),突然停止响应,出现下面的对话框: 对话框中的文字为: Waiting for a requir ...
- Air Raid---hdu1151(最小路径覆盖)
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1151 最小路径覆盖 == 顶点数 - 最大匹配. #include<stdio.h> #i ...
- Instagram 架构分析笔记(转)
原文:http://dbanotes.net/?s=Instagram+%E6%9E%B6%E6%9E%84%E5%88%86%E6%9E%90%E7%AC%94%E8%AE%B0 作者:冯大辉 In ...
- android GridView的setOnItemClickListener事件不执行
问题可能1: item设置的可能是button,或者可以click点击事件控件,导致控件执行而item按钮不执行 解决方法:设置控件 的 android:clickable="false& ...
- 给所有开发者的React Native详细入门指南
建议先下载好资料后,再阅读本文.demo代码和资料下载 目录 一.前言 二.回答一些问题 1.为什么写此教程 2.本文适合哪些人看 3.如何使用本教程 4.需要先学习JavaScript.HTML.C ...