ModelBinderDictionary.GetBinder 方法

定义

重载

GetBinder(Type, Boolean)

检索指定类型的模型联编程序或检索默认模型联编程序。

GetBinder(Type)

检索指定类型的模型联编程序。

GetBinder(Type, Boolean)

检索指定类型的模型联编程序或检索默认模型联编程序。

public virtual System.Web.Mvc.IModelBinder GetBinder (Type modelType, bool fallbackToDefault);
abstract member GetBinder : Type * bool -> System.Web.Mvc.IModelBinder
override this.GetBinder : Type * bool -> System.Web.Mvc.IModelBinder
Public Overridable Function GetBinder (modelType As Type, fallbackToDefault As Boolean) As IModelBinder

参数

modelType
Type

要检索的模型的类型。

fallbackToDefault
Boolean

如果为 true,则检索默认模型联编程序。

返回

模型联编程序。

例外

modelType 参数为 null。

适用于

GetBinder(Type)

检索指定类型的模型联编程序。

public System.Web.Mvc.IModelBinder GetBinder (Type modelType);
member this.GetBinder : Type -> System.Web.Mvc.IModelBinder
Public Function GetBinder (modelType As Type) As IModelBinder

参数

modelType
Type

要检索的模型的类型。

返回

模型联编程序。

例外

modelType 参数为 null。

适用于