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 
ExecuteAsyncmethod of theApiControlleris invoked. - The 
Initializemethod of theApiControlleris invoked. - The registered Action Selector is retrieved.
 - The 
SelectActionmethod 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.ModelStateis 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 
InvokeActionAsyncmethod 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-& ...
 
随机推荐
- hihocoder [Offer收割]编程练习赛14 投掷硬币
			
题目2 : 投掷硬币 时间限制:10000ms 单点时限:1000ms 内存限制:256MB 描述 小Hi有一枚神奇的硬币.已知第i次投掷这枚硬币时,正面向上的概率是Pi. 现在小Hi想知道如果总共投 ...
 - thinkphp---手机访问切换模板!
			
手机访问切换模板:一般用在手机在做自适应的情况. 第一步:需要添加判断是否是手机访问的方法: http://www.cnblogs.com/e0yu/p/7561811.html 第二步:Home / ...
 - Floyd算法并输出路径
			
hdu1224 Free DIY Tour Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Ot ...
 - mysql查看线程详解(转载)
			
如果有 SUPER 权限,则可以看到全部的线程,否则,只能看到自己发起的线程(这是指,当前对应的 MySQL 帐户运行的线程). mysql> show processlist; +—–+——— ...
 - 聊一聊goroutine stack
			
通过阅读这篇文章对内存的处理以及栈的扩容有了新的认识,我们在生产环境中也遇到了内存使用量超大的情况,现在怀疑也可能是由于栈扩容导致的 很好的一片文章: 推送在外卖订餐中扮演着重要的角色,为商家实时接单 ...
 - 快速定位oracle故障-恩墨
			
首先我们要明白一点,所谓的故障,意味着相对来讲比较严重.也就是可能比不同的问题要严重一些,比如锁等待. 要能够快速的定位和解决问题,恢复业务正常:首先我们需要了解Oracle的一些常见的故障有哪些. ...
 - ArcGIS API for JavaScript开发笔记(一)——ArcGIS for Javascript API 3.14本地部署
			
堪称史上最详细的< ArcGIS forJavascript API 3.14本地部署>文档,有图有真相~~~ ---------环境:Windows server 2012R2,IIS ...
 - scrapy爬虫系列之四--爬取列表和详情
			
功能点:如何爬取列表页,并根据列表页获取详情页信息? 爬取网站:东莞阳光政务网 完整代码:https://files.cnblogs.com/files/bookwed/yangguang.zip 主 ...
 - LeetCode——Palindrome Number
			
Determine whether an integer is a palindrome. Do this without extra space. Some hints: Could negativ ...
 - Java-idea-常用技巧-转maven,解决包依赖冲突
			
1.Intellij IDEA如何将普通工程转换成maven工程 项目上右键 Add Framework Support,选择maven 2.Intellij IDEA 自动生成 serialVers ...