語言

ModelBinderProviderCollection.RegisterBinderForType 方法

定義

為非通用型別新增模型綁定器提供者。

多載

名稱 Description
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

模型活頁夾。

適用於