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
HttpParameterDescriptorThe parameter descriptor.
modelBinder
IModelBinderThe 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
ModelMetadataProviderThe metadata provider to use for validation.
actionContext
HttpActionContextThe action context for the binding.
cancellationToken
CancellationTokenThe cancellation token assigned for this task for cancelling the binding operation.
Returns
- Task
The task that is signaled when the binding is complete.