DefaultModelBinder.GetTypeDescriptor 方法

定义

返回类型的描述符对象,该类型是使用其控制器上下文和绑定上下文来指定的。

protected virtual System.ComponentModel.ICustomTypeDescriptor GetTypeDescriptor (System.Web.Mvc.ControllerContext controllerContext, System.Web.Mvc.ModelBindingContext bindingContext);
abstract member GetTypeDescriptor : System.Web.Mvc.ControllerContext * System.Web.Mvc.ModelBindingContext -> System.ComponentModel.ICustomTypeDescriptor
override this.GetTypeDescriptor : System.Web.Mvc.ControllerContext * System.Web.Mvc.ModelBindingContext -> System.ComponentModel.ICustomTypeDescriptor
Protected Overridable Function GetTypeDescriptor (controllerContext As ControllerContext, bindingContext As ModelBindingContext) As ICustomTypeDescriptor

参数

controllerContext
ControllerContext

运行控制器的上下文。 上下文信息包括控制器、HTTP 内容、请求上下文和路由数据。

bindingContext
ModelBindingContext

绑定模型的上下文。 上下文包含模型对象、模型名称、模型类型、属性筛选器和值提供程序等信息。

返回

自定义类型描述符对象。

适用于