当前位置: 首页 > news >正文

购物网站修改注册信息模块的分析微信做代理的网站

购物网站修改注册信息模块的分析,微信做代理的网站,最简单的网站,贵阳网站建设套餐1. ActionInvoker 的执行#xff1a; 在MVC 中 包括Model绑定与验证在内的整个Action的执行是通过一个名为ActionInvoker的组件来完成的。 它同样具有 同步/异步两个版本。 分别实现了接口 IActionInvoker /IAsyncActionInvoker。 ASP.NET MVC 中真正用于Action方法同步和异步…1. ActionInvoker 的执行   在MVC 中  包括Model绑定与验证在内的整个Action的执行是通过一个名为ActionInvoker的组件来完成的。 它同样具有 同步/异步两个版本。      分别实现了接口 IActionInvoker /IAsyncActionInvoker。      ASP.NET MVC 中真正用于Action方法同步和异步执行ActionInvoker 类型分别是 ContorllerActionInvoker /AsyncContollerActionInvoker.      AsyncContollerActionInvoker 是 ContorllerActionInvoker  的子类      也就是说 当Action 没有指定  实现 IActionInvoker /IAsyncActionInvoker 接口的时候  它默认是 执行AsyncContollerActionInvoker 的.     我们来看下面的代码片段     我们通过 Ninject 对 SyncActionInvoker 和 AsyncActionInvoker 进行接口的映射,然后创建一个 ActionInvoker      其返回的结果分别是  各自的实例对象 AsyncContollerActionInvoker SyncActionInvoker  AsyncActionInvoker 这中间有一个前提需要进行 缓冲的清除        public ActionResult Index(){return View(this.GetActionInvokers().ToArray());}public IEnumerableIActionInvoker GetActionInvokers(){//Current 代表的是当前DependencyResolver。NinjectDependencyResolver dependencyResolver (NinjectDependencyResolver)DependencyResolver.Current;//1. 默认创建的ActionInvokeryield return this.CreateActionInvoker();//2. 为Dependency注册针对IActionInvoker的类型映射 dependencyResolver.RegisterIActionInvoker, SyncActionInvoker();yield return this.CreateActionInvoker();//3. 为Dependency注册针对IAsyncActionInvoker的类型映射dependencyResolver.RegisterIAsyncActionInvoker, AsyncActionInvoker();yield return this.CreateActionInvoker();}    注意 创建 ActionInvoker 的3个步骤      1.) 在创建 CreateActionInvoker 的时候 如果返回 不为null 则将其默认为ActionInvoker 也就是如上代码清除ActionInvoker缓存后 它返回                             AsyncContollerActionInvoker 如果 返回null  则进入 下一步骤。    2.) 创建 IActionInvoker  规则同上    3.)创建 IAsyncActionInvoker 规则同上    2. ControllerDescriptor 的同步/异步   如果Controller使用ControllerActionInvoker ,它所有的Action总是以同步方式执行。       如果 Controller使用AsyncControllerActionInvoker 作为ActionInvoker时却并不意味这总是异步方式。       通过两个描述对象 ControllerDescriptor  和 ActionDescriptor        在默认情况下 ReflectedControllerDescriptor  是通过ControllerActionInvoker 来创建的。       ReflectedAsyncControllerActionInvoker 是通过AsyncControllerActionInvoker  来创建的。       看如下代码 他们返回 返回的值 分别是对象类型的  ReflectedControllerDescriptor   和 ReflectedAsyncControllerActionInvoker 。 public class SyncActionInvoker : ControllerActionInvoker{public new ControllerDescriptor GetControllerDescriptor(ControllerContext controllerContext){return base.GetControllerDescriptor(controllerContext);}}public class AsyncActionInvoker : AsyncControllerActionInvoker{public new ControllerDescriptor GetControllerDescriptor(ControllerContext controllerContext){return base.GetControllerDescriptor(controllerContext);}}      3.ActionDescriptor的执行。      Action 方法可以采用同步和异步执行方式异步Action对应的ActionDescriptor 直接或者间接继承自抽象类AsyncActionDescriptor,      AsyncActionDescriptor 又是抽象类ActionDescriptor的子类。      同步和异步的 Action 分别 调用 Execute 和  BeginExecute/EndExecute方法来完成      AsyncActionDescriptor 重写了Execute 会抛出异常所以 AsyncActionDescriptor对象只能采用异步执行。     同步Action 通过ReflectedControllerDescriptor 对象描述。     异步Action 通过ReflectedAsyncControllerDescriptor  对象描述。     返回Task的异步Action 则通过TaskAsyncControllerDescriptor 对象描述。       转载于:https://www.cnblogs.com/dragon-L/p/5259917.html
http://www.sadfv.cn/news/254306/

相关文章:

  • 河池市住房城乡建设网站seo最新技巧
  • 网站密码是什么情况网站后台模板如何使用
  • 云建站管理区建设网站360
  • 没有网站如何做cpa推广oa办公系统官网
  • 浙江省邮电工程建设有限公司网站关于网站建设的广告词
  • 贵阳网站建设odenet三河建设厅公示网站
  • 平原网站建设费用房子网站有哪些
  • 休闲食品网站建设网页设计的尺寸大小是多少宽
  • 网站加盟城市分站什么是网络营销管理
  • 百度网站的总结国外vi设计网站
  • 网站设计一个版块建设银行 上海科技中心网站
  • asp网站显示空白佛山林镜全
  • win2008iis配置网站工信部备案查询
  • 青岛建网站公司php网站开发环境一
  • 烟台市住房和规划建设管理局网站站群网站建设
  • c 网站建设大作业代码网络营销公司都做什么的
  • 店铺首页如何设计南宁软件优化网站
  • 帝国程序如何改网站标题网络营销推广的平台
  • 深圳网站做的好的公司哪家好17模板网入口
  • 高端网站建设有哪些平面广告设计培训招生
  • 阿里云网站模板 解析营销目标包括哪些内容
  • 做学校和企业对接的网站北京网站排名制作
  • 北京市教学名师奖建设项目网站专业商城网站搭建费用
  • 装修网站模板源码做ppt的动图下载哪些网站
  • 企业可以做哪些网站有哪些wordpress 左侧浮动
  • 在小型网站建设小组菜单宣传网站怎么做的
  • 广州一起做网店网站做网站设计抬头
  • 礼县住房和城乡建设局网站中国装修第一网
  • 织梦高端html5网站建设工作室网络公司网站模板云南网站seo服务
  • 智能科技网站模板下载地址seo外链招聘