webapi中的扩展点
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中的扩展点的更多相关文章
- Spring中的扩展点
Spring作为一个常用的IOC框架,在设计上预留了很多的扩展点,很多第三方开源框架,包括Spring自身也是基于这些扩展点实现的,这很好的体现了对修改关闭.对扩展开放的原则.总的来说Spring的扩 ...
- 【转】MVC中的扩展点
原文地址:http://www.cnblogs.com/xfrog/tag/MVC/ MVC中的扩展点(十)辅助方法 MVC中的扩展点(九)验证 MVC中的扩展点(八)模型绑定 ...
- MVC中你必须知道的13个扩展点
MVC中你必须知道的13个扩展点 pasting 转:http://www.cnblogs.com/kirinboy/archive/2009/06/01/13-asp-net-mvc-extensi ...
- [转]ASP.NET MVC中你必须知道的13个扩展点
本文转自:http://www.cnblogs.com/ejiyuan/archive/2010/03/09/1681442.html ScottGu在其最新的博文中推荐了Simone Chiaret ...
- Spring Boot 中如何使用 Dubbo Activate 扩展点
摘要: 原创出处 www.bysocket.com 「泥瓦匠BYSocket 」欢迎转载,保留摘要,谢谢! 『 公司的核心竞争力在于创新 – <启示录> 』 继续上一篇:< Spri ...
- python---django中form组件(数据添加前使用自定义方法<django预留扩展点3个>进行验证,以及源码分析)
form组件代码: from app02.models import Userfrom django.core.exceptions import ValidationError class Ajax ...
- ASP.NET MVC中你必须知道的13个扩展点
ScottGu在其最新的博文中推荐了Simone Chiaretta的文章13 ASP.NET MVC extensibility points you have to know,该文章为我 ...
- Rafy 框架 - 插件级别的扩展点
本章说明如何使用额外的插件(如客户化插件)对另一插件(如产品插件)进行扩展. 使用场景 在 产品线工程 中,项目的研发分为领域工程和应用工程.这个过程中会需要对领域工程中的内容进行大量的扩展. ...
- 玩转Asp.net MVC 的八个扩展点
MVC模型以低耦合.可重用.可维护性高等众多优点已逐渐代替了WebForm模型.能够灵活使用MVC提供的扩展点可以达到事半功倍的效果,另一方面Asp.net MVC优秀的设计和高质量的代码也值得我们去 ...
随机推荐
- xml-DTD相关
DTD约束既可以作为一个单独的文件,也可以在XML文件内编写. 在XML文件内编写DTD:
- 新发现的一些C函数
今天看lsocket代码,发现有三个C函数,以前一直没有用过. 觉得特别有意思,一个strspn,一个strrchr,一个getaddrinfo. strspn #include <string ...
- Spring MVC中页面向后台传值的几种方式
在学习 Spring Mvc 过程中,有必要来先了解几个关键参数: @Controller: 在类上注解,则此类将编程一个控制器,在项目启动 Spring 将自动扫描此类,并进行对 ...
- C# 图形普通处理,resize ,水印..
网站中,对用户图片上传处理是很有必要的.对于一些常用的处理,对图片各种形式的压缩,各种形式的水印. 1.裁剪正方形头像方法 /// <summary> /// 正方型裁剪 /// 以图片中 ...
- bat脚本-set(setlocal enabledelayedexpansion) 学习
设置本地为延迟扩展.其实也就是:延迟变量,全称延迟环境变量扩展. 事件一: @echo off set a=4 set a=5&echo %a% pause 解说:为什么是4而不是5呢?在ec ...
- WPF中TextBox的PreviewMouseLeftButtonUp事件
当使用TextBox的PreviewMouseLeftButtonUp事件时(例如,鼠标点击进入TextBox时,清除当前的输入内容),会很意外地发现,这时候不论怎么点击都无法点击到其他控件,焦点一直 ...
- Android开源库loopj的android-async-http的 JsonHttpResponseHandler 存在死循环GC_CONCURRENT
我现在用的是 AndroidAsyncHttp 1.4.4 版本,之前遇到一个很奇怪的问题, 当使用 JsonHttpResponseHandler 解析请求的页面出现服务器错误或其他情况返回的内容不 ...
- 6. Shell 流程控制
1. 条件选择流程 1.1 if #!/bin/bash # if 格式 #if condition #then # command1 # command2 # ... # commandN #fi ...
- HTTP中的重定向和请求转发的区别
原文出处:http://blog.csdn.net/meiyalei/article/details/2129120 一.调用方式 我们知道,在servlet中调用转发.重定向的语句如下: reque ...
- RPD添加网址、变量