ModelBinderDictionary.GetBinder Method

Definition

Overloads

GetBinder(Type, Boolean)

Retrieves the model binder for the specified type or retrieves the default model binder.

GetBinder(Type)

Retrieves the model binder for the specified type.

GetBinder(Type, Boolean)

Retrieves the model binder for the specified type or retrieves the default model binder.

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

Parameters

modelType
Type

The type of the model to retrieve.

fallbackToDefault
Boolean

true to retrieve the default model binder.

Returns

The model binder.

Exceptions

The modelType parameter is null.

Applies to

GetBinder(Type)

Retrieves the model binder for the specified 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

Parameters

modelType
Type

The type of the model to retrieve.

Returns

The model binder.

Exceptions

The modelType parameter is null.

Applies to