控制器动作调用者
ControllerActionInvoker类有什么用?
What is the use of ControllerActionInvoker class?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
ControllerActionInvoker类有什么用?
What is the use of ControllerActionInvoker class?
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(1)
基本上,它是控制器类上的一个扩展点,允许您进入那里并影响控制器与参数、过滤器和操作本身的交互方式。 当请求被路由到控制器时,控制器要求 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!