Extension Points

Web API provides extension points for some parts of the routing process.

Interface Description
IHttpControllerSelector Selects the controller.
IHttpControllerTypeResolver Gets the list of controller types. The DefaultHttpControllerSelector chooses the controller type from this list.
IAssembliesResolver Gets the list of project assemblies. The IHttpControllerTypeResolver interface uses this list to find the controller types.
IHttpControllerActivator Creates new controller instances.
IHttpActionSelector Selects the action.
IHttpActionInvoker Invokes the action.

To provide your own implementation for any of these interfaces, use the Services collection on the HttpConfiguration object:

var config = GlobalConfiguration.Configuration;
config.Services.Replace(typeof(IHttpControllerSelector), new MyControllerSelector(config));

webapi中的扩展点的更多相关文章

  1. Spring中的扩展点

    Spring作为一个常用的IOC框架,在设计上预留了很多的扩展点,很多第三方开源框架,包括Spring自身也是基于这些扩展点实现的,这很好的体现了对修改关闭.对扩展开放的原则.总的来说Spring的扩 ...

  2. 【转】MVC中的扩展点

    原文地址:http://www.cnblogs.com/xfrog/tag/MVC/      MVC中的扩展点(十)辅助方法   MVC中的扩展点(九)验证   MVC中的扩展点(八)模型绑定   ...

  3. MVC中你必须知道的13个扩展点

    MVC中你必须知道的13个扩展点 pasting 转:http://www.cnblogs.com/kirinboy/archive/2009/06/01/13-asp-net-mvc-extensi ...

  4. [转]ASP.NET MVC中你必须知道的13个扩展点

    本文转自:http://www.cnblogs.com/ejiyuan/archive/2010/03/09/1681442.html ScottGu在其最新的博文中推荐了Simone Chiaret ...

  5. Spring Boot 中如何使用 Dubbo Activate 扩展点

    摘要: 原创出处 www.bysocket.com 「泥瓦匠BYSocket 」欢迎转载,保留摘要,谢谢! 『 公司的核心竞争力在于创新 – <启示录> 』 继续上一篇:< Spri ...

  6. python---django中form组件(数据添加前使用自定义方法<django预留扩展点3个>进行验证,以及源码分析)

    form组件代码: from app02.models import Userfrom django.core.exceptions import ValidationError class Ajax ...

  7. ASP.NET MVC中你必须知道的13个扩展点

         ScottGu在其最新的博文中推荐了Simone Chiaretta的文章13 ASP.NET MVC extensibility points you have to know,该文章为我 ...

  8. Rafy 框架 - 插件级别的扩展点

    本章说明如何使用额外的插件(如客户化插件)对另一插件(如产品插件)进行扩展.   使用场景 在 产品线工程 中,项目的研发分为领域工程和应用工程.这个过程中会需要对领域工程中的内容进行大量的扩展.   ...

  9. 玩转Asp.net MVC 的八个扩展点

    MVC模型以低耦合.可重用.可维护性高等众多优点已逐渐代替了WebForm模型.能够灵活使用MVC提供的扩展点可以达到事半功倍的效果,另一方面Asp.net MVC优秀的设计和高质量的代码也值得我们去 ...

随机推荐

  1. [ An Ac a Day ^_^ ][kuangbin带你飞]专题六 最小生成树 POJ 2031 Building a Space Station

    最小生成树模板题 注意最后输出用%f (从C99开始%f已经不能用于输出double 即 输入用%lf 输出用%f) #include<cstdio> #include<algori ...

  2. html+css基础篇

    2016年11月19号,计划把基础在看一下,听大神说好的东西就要多看几遍,知识是学来用的解决问题的,加油 接下来的是我在自学中的小笔记吧,每天都在保持几个小时的学习思考状态,由于要升本所以学前端的时间 ...

  3. 2016-2017 CT S03E02: Codeforces Trainings Season 3 Episode 2

    A HHPaint B Square Root C Interesting Places D Road to Home E Ant and apples F Square G Pair H The F ...

  4. HDU 4403 A very hard Aoshu problem

    暴力$dfs$. 先看数据范围,字符串最长只有$15$,也就是说枚举每个字符后面是否放置“$+$”号的复杂度为${2^{15}}$. 每次枚举到一种情况,看哪些位置能放“$=$”号,每个位置都试一下, ...

  5. select与ajax结合

    要实现的功能是,点击select输入框,数据库里面的数据会以option弹出. 这需要用到ajax异步连接数据库 下面贴出代码 先说明一下后台传递的数据是json,以map的形式传入的.后台代码很简单 ...

  6. Atomic 升级

    Atomic 采用类似github的版本管理,  可以使用以下命令升级 ostree remote add --set=gpg-verify=false atomic20160212 http://. ...

  7. js常用语句写法

    1.for语句 for(var i = 0; i<6; i++) //0,1,2,3,4,5

  8. mysql中文显示问号

    mysql插入中文后显示为?,查到http://blog.csdn.net/chenxingzhen001/article/details/7567812中方法,即 在my.ini配置文件中的[myd ...

  9. 第九章 观察者模式 OBSERVER

    当对象发生改变时,应该使客户得到通知,然后,让客户查询对象的新状态. 其目的是在对象之间(目标对象和客户对象),定义了一个一对多的依赖关系,从而一个对象状态发生改变时,所有依赖这个对象的对象都能得到通 ...

  10. IE8下 Select文字垂直居中的办法

    .select { padding: 4px 0; height: 30px; line-height: 26px; vertical-align: middle;} 处理前: 处理后: