语言

ModelBinderProviderCollection.RegisterBinderForType 方法

定义

将模型绑定器提供程序添加到非泛型类型的集合中。

重载

名称 说明
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

模型绑定器。

适用于