摘要: 1.静态代码块 2.内部类 3.Lazy 4.单例模式基类(转自https://www.cnblogs.com/zhouzl/archive/2019/04/11/10687909.html) 阅读全文
posted @ 2019-06-12 23:44 不坑不舒服司机 阅读(4466) 评论(0) 推荐(0) 编辑
摘要: webform是怎么通过url找到对应handler的呢? mvc 和webapi的路由都是通过注册到RouteTable.Routes中,然后在urlroutingmodule中路由到对应routehander,那以前webform程序没有注册路由又是怎么找到对应的handler的呢? 在http 阅读全文
posted @ 2019-06-11 22:00 不坑不舒服司机 阅读(596) 评论(0) 推荐(0) 编辑
摘要: webapi的路由注册 mvc的路由注册 urlRoutingModule路由 阅读全文
posted @ 2019-06-11 15:03 不坑不舒服司机 阅读(265) 评论(0) 推荐(0) 编辑
摘要: 1.Global.asax中路由的注册 public class WebApiApplication : System.Web.HttpApplication { protected void Application_Start() { AreaRegistration.RegisterAllAre 阅读全文
posted @ 2019-06-10 23:45 不坑不舒服司机 阅读(855) 评论(0) 推荐(0) 编辑
摘要: 我们从application获取的时候查看stepmanager的实现类 初始化application 创建步骤及执行步骤 经典模式PipelineStepManager管道创建步骤 CallHandlerExecutionStep 执行步骤 集成模式同理 阅读全文
posted @ 2019-06-10 20:53 不坑不舒服司机 阅读(262) 评论(0) 推荐(0) 编辑
摘要: 上一节说在urlroutingmodule中mvchandler 映射到httpcontext上,那mvchandler又是怎么执行的呢? (1)、httpruntime 从isapiruntime pr方法到httpruntime ProcessRequestNoDemand(wr)方法 Proc 阅读全文
posted @ 2019-06-10 18:50 不坑不舒服司机 阅读(204) 评论(0) 推荐(0) 编辑
摘要: 注册在C:\Windows\Microsoft.NET\Framework\v2.0.50727\CONFIG \webconfig中 在该module源码中 我们可以看出注册了application中的PostResolveRequestCache事件 在这个方法中定义了context上下文为ht 阅读全文
posted @ 2019-06-09 22:00 不坑不舒服司机 阅读(333) 评论(0) 推荐(0) 编辑