ICustomModelBinder Interface
Extends Microsoft.AspNetCore.Mvc.ModelBinding.IModelBinder with the ability to determine whether a specific model type and binding source can be handled.
public interface ICustomModelBinder : Microsoft.AspNetCore.Mvc.ModelBinding.IModelBinderDerived
↳ CustomModelFromBodyBinder<TModel>
↳ CustomModelFromQueryBinder<TModel>
↳ CustomModelFromRouteBinder<TModel>
↳ ICustomModelFromQueryBinder
↳ StructModelBinder<TModel>
Implements Microsoft.AspNetCore.Mvc.ModelBinding.IModelBinder
Methods
Section titled “Methods”ICustomModelBinder.CanBind(Type, BindingSource) Method
Section titled “ICustomModelBinder.CanBind(Type, BindingSource) Method”Determines whether this binder can bind the specified modelType from the given bindingSource.
bool CanBind(System.Type modelType, Microsoft.AspNetCore.Mvc.ModelBinding.BindingSource? bindingSource);Parameters
Section titled “Parameters”modelType System.Type
The System.Type of the model to bind.
bindingSource Microsoft.AspNetCore.Mvc.ModelBinding.BindingSource
The Microsoft.AspNetCore.Mvc.ModelBinding.BindingSource indicating where the data originates, or null.
Returns
Section titled “Returns”System.Boolean
true if this binder supports the specified model type and binding source; otherwise, false.