ModelBinderProviderCollection.RegisterBinderForType 方法

定義

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

多載

RegisterBinderForType(Type, Func<IModelBinder>)

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

RegisterBinderForType(Type, IModelBinder)

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

RegisterBinderForType(Type, Func<IModelBinder>)

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

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>

模型繫結器 Factory。

適用於

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

模型繫結器。

適用於