ModelBinderProviderCollection.RegisterBinderForGenericType 方法

定義

將模型繫結器提供者加入至泛型型別集合。

多載

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

使用指定之模型型別和模型繫結器 Factory,將模型繫結器加入至泛型型別集合。

RegisterBinderForGenericType(Type, Type)

使用指定之模型型別和模型繫結器型別,將模型繫結器提供者加入至泛型型別集合。

RegisterBinderForGenericType(Type, IModelBinder)

使用指定之模型型別和模型繫結器,將模型繫結器提供者加入至泛型型別集合。

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

使用指定之模型型別和模型繫結器 Factory,將模型繫結器加入至泛型型別集合。

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>

模型繫結器 Factory。

適用於

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

模型繫結器。

適用於