Table of Contents

Class ModelBinderParameterBinding

Namespace
System.Web.Http.ModelBinding
Assembly
System.Web.Http.dll

Describes a parameter that gets bound via ModelBinding.

public class ModelBinderParameterBinding : HttpParameterBinding, IValueProviderParameterBinding
Inheritance
ModelBinderParameterBinding
Implements
Inherited Members

Constructors

ModelBinderParameterBinding(HttpParameterDescriptor, IModelBinder, IEnumerable<ValueProviderFactory>)

Initializes a new instance of the ModelBinderParameterBinding class.

public ModelBinderParameterBinding(HttpParameterDescriptor descriptor, IModelBinder modelBinder, IEnumerable<ValueProviderFactory> valueProviderFactories)

Parameters

descriptor HttpParameterDescriptor

The parameter descriptor.

modelBinder IModelBinder

The model binder.

valueProviderFactories IEnumerable<ValueProviderFactory>

The collection of value provider factory.

Properties

Binder

Gets the model binder.

public IModelBinder Binder { get; }

Property Value

IModelBinder

The model binder.

ValueProviderFactories

Gets the collection of value provider factory.

public IEnumerable<ValueProviderFactory> ValueProviderFactories { get; }

Property Value

IEnumerable<ValueProviderFactory>

The collection of value provider factory.

Methods

ExecuteBindingAsync(ModelMetadataProvider, HttpActionContext, CancellationToken)

Asynchronously executes the parameter binding via the model binder.

public override Task ExecuteBindingAsync(ModelMetadataProvider metadataProvider, HttpActionContext actionContext, CancellationToken cancellationToken)

Parameters

metadataProvider ModelMetadataProvider

The metadata provider to use for validation.

actionContext HttpActionContext

The action context for the binding.

cancellationToken CancellationToken

The cancellation token assigned for this task for cancelling the binding operation.

Returns

Task

The task that is signaled when the binding is complete.