ControllerActionInvoker [英] ControllerActionInvoker

查看:48
本文介绍了ControllerActionInvoker的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

ControllerActionInvoker类的用途是什么?

What is the use of ControllerActionInvoker class?

推荐答案

基本上,它是Controller类的可扩展性,它使您可以进入该类并影响控制器与参数,过滤器和Action本身的交互方式.将请求路由到控制器后,控制器会要求ControllerActionInvoker处理该请求(通常涉及到它在控制器上调用方法).

Basically it's an extensibility point on a Controller class that allows you to get in there and influence how the controller interacts with Parameters, Filters and the Action itself. When a request has been routed to the Controller, the Controller asks the ControllerActionInvoker to deal with the request (which normally involves it calling a method back on the Controller).

到目前为止,我看到的主要用法是将依赖项注入到动作过滤器中,如下所示:

The main usage of this I've seen so far is to provide dependency injection into Action Filters as shown here, but I'm sure we'll see more uses for this feature popping up in the future!

这篇关于ControllerActionInvoker的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆