Skip to content

ModelBinderBase Class

Provides a base implementation for a model binder.

C#
public abstract class ModelBinderBase : Microsoft.AspNetCore.Mvc.ModelBinding.IModelBinder

Inheritance System.Object → ModelBinderBase

Derived
AuthenticationHeaderBinder
CultureInfoBinder
JsonSerializerModelBinder
SecondsToTimeSpanModelBinder
SpaceSeparatedValuesBinder

Implements Microsoft.AspNetCore.Mvc.ModelBinding.IModelBinder

Remarks

This abstract class serves as a foundation for custom model binders. It handles common binding tasks and delegates the specific parsing logic to the derived classes through the abstract Abblix.Oidc.Server.Mvc.Binders.ModelBinderBase.TryParse(System.Type,Microsoft.Extensions.Primitives.StringValues,System.Object@) method.

Methods

ModelBinderBase.BindModelAsync(ModelBindingContext) Method

Asynchronously binds the model for a given action method parameter.

C#
public virtual System.Threading.Tasks.Task BindModelAsync(Microsoft.AspNetCore.Mvc.ModelBinding.ModelBindingContext bindingContext);

Parameters

bindingContext Microsoft.AspNetCore.Mvc.ModelBinding.ModelBindingContext

The context for the model binding process, containing information about the model object, the state of the model binding, and other metadata.

Implements BindModelAsync(ModelBindingContext)

Returns

System.Threading.Tasks.Task
A task representing the model binding process.

Exceptions

System.ArgumentNullException
Thrown when the bindingContext is null.