ASP.Net MVC ActionFilterAttributes全局与本地排序 [英] ASP.Net MVC ActionFilterAttributes ordering Global vs Local
本文介绍了ASP.Net MVC ActionFilterAttributes全局与本地排序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想知道是否有执行ActionFilterAttribute属性的命令.我猜本地的(在Controller的Action上定义的ActionFilterAttribute)按在Action上定义的顺序执行.
I was wondering if there was an order to the execution of ActionFilterAttribute attributes. I am guessing the local ones (an ActionFilterAttribute defined on the Action of a Controller) are executing in the order they are defined on the Action.
但是,是否在全局过滤器之前先应用全局过滤器,反之亦然?另外,如果有一个已定义的顺序,而不仅是任意顺序,那么在Mvc的各个版本中是否一致?
However does any one no whether Global filters are applied before local ones or vice versa? Also if there is a defined order and not just arbitary is it consistent across version of Mvc?
先谢谢了 汤姆
推荐答案
查看全文