ModelBinderProviderCollection.RegisterBinderForGenericType 方法

定义

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

重载

名称 说明
RegisterBinderForGenericType(Type, Func<Type[],IModelBinder>)

使用指定的模型类型和模型绑定器工厂将模型绑定器添加到泛型类型的集合中。

RegisterBinderForGenericType(Type, Type)

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

RegisterBinderForGenericType(Type, IModelBinder)

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

RegisterBinderForGenericType(Type, Func<Type[],IModelBinder>)

使用指定的模型类型和模型绑定器工厂将模型绑定器添加到泛型类型的集合中。

public:
 void RegisterBinderForGenericType(Type ^ modelType, Func<cli::array <Type ^> ^, System::Web::ModelBinding::IModelBinder ^> ^ modelBinderFactory);
public void RegisterBinderForGenericType(Type modelType, Func<Type[],System.Web.ModelBinding.IModelBinder> modelBinderFactory);
member this.RegisterBinderForGenericType : Type * Func<Type[], System.Web.ModelBinding.IModelBinder> -> unit
Public Sub RegisterBinderForGenericType (modelType As Type, modelBinderFactory As Func(Of Type(), IModelBinder))

参数

modelType
Type

模型类型。

modelBinderFactory
Func<Type[],IModelBinder>

模型绑定器工厂。

适用于

RegisterBinderForGenericType(Type, Type)

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

public:
 void RegisterBinderForGenericType(Type ^ modelType, Type ^ modelBinderType);
public void RegisterBinderForGenericType(Type modelType, Type modelBinderType);
member this.RegisterBinderForGenericType : Type * Type -> unit
Public Sub RegisterBinderForGenericType (modelType As Type, modelBinderType As Type)

参数

modelType
Type

模型类型。

modelBinderType
Type

模型绑定器类型。

适用于

RegisterBinderForGenericType(Type, IModelBinder)

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

public:
 void RegisterBinderForGenericType(Type ^ modelType, System::Web::ModelBinding::IModelBinder ^ modelBinder);
public void RegisterBinderForGenericType(Type modelType, System.Web.ModelBinding.IModelBinder modelBinder);
member this.RegisterBinderForGenericType : Type * System.Web.ModelBinding.IModelBinder -> unit
Public Sub RegisterBinderForGenericType (modelType As Type, modelBinder As IModelBinder)

参数

modelType
Type

模型类型。

modelBinder
IModelBinder

模型绑定器。

适用于