ModelBinderProviderCollection.RegisterBinderForType 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
添加一个模型联编程序提供程序到一个非泛型类型的集合。
重载
RegisterBinderForType(Type, Func<IModelBinder>) |
使用指定的模型类型和模型联编程序工厂,添加一个模型联编程序提供程序到非泛型类型的的集合。 |
RegisterBinderForType(Type, IModelBinder) |
使用指定的模型类型和模型联编程序,添加一个模型联编程序提供程序到非泛型类型的的集合。 |
RegisterBinderForType(Type, Func<IModelBinder>)
使用指定的模型类型和模型联编程序工厂,添加一个模型联编程序提供程序到非泛型类型的的集合。
public:
void RegisterBinderForType(Type ^ modelType, Func<System::Web::ModelBinding::IModelBinder ^> ^ modelBinderFactory);
public void RegisterBinderForType (Type modelType, Func<System.Web.ModelBinding.IModelBinder> modelBinderFactory);
member this.RegisterBinderForType : Type * Func<System.Web.ModelBinding.IModelBinder> -> unit
Public Sub RegisterBinderForType (modelType As Type, modelBinderFactory As Func(Of IModelBinder))
参数
- modelType
- Type
模型类型。
- modelBinderFactory
- Func<IModelBinder>
模型联编程序工厂。
适用于
RegisterBinderForType(Type, IModelBinder)
使用指定的模型类型和模型联编程序,添加一个模型联编程序提供程序到非泛型类型的的集合。
public:
void RegisterBinderForType(Type ^ modelType, System::Web::ModelBinding::IModelBinder ^ modelBinder);
public void RegisterBinderForType (Type modelType, System.Web.ModelBinding.IModelBinder modelBinder);
member this.RegisterBinderForType : Type * System.Web.ModelBinding.IModelBinder -> unit
Public Sub RegisterBinderForType (modelType As Type, modelBinder As IModelBinder)
参数
- modelType
- Type
模型类型。
- modelBinder
- IModelBinder
模型联编程序。