CollectionModelBinder<TElement> Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
IModelBinder implementation for binding collection values.
generic <typename TElement>
public ref class CollectionModelBinder : Microsoft::AspNetCore::Mvc::ModelBinding::ICollectionModelBinder, Microsoft::AspNetCore::Mvc::ModelBinding::IModelBinder
public class CollectionModelBinder<TElement> : Microsoft.AspNetCore.Mvc.ModelBinding.ICollectionModelBinder, Microsoft.AspNetCore.Mvc.ModelBinding.IModelBinder
type CollectionModelBinder<'Element> = class
interface ICollectionModelBinder
interface IModelBinder
Public Class CollectionModelBinder(Of TElement)
Implements ICollectionModelBinder, IModelBinder
Type Parameters
- TElement
Type of elements in the collection.
- Inheritance
-
CollectionModelBinder<TElement>
- Derived
- Implements
Constructors
CollectionModelBinder<TElement>(IModelBinder, ILoggerFactory, Boolean, MvcOptions) |
Creates a new CollectionModelBinder<TElement>. |
CollectionModelBinder<TElement>(IModelBinder, ILoggerFactory, Boolean) |
Creates a new CollectionModelBinder<TElement>. |
CollectionModelBinder<TElement>(IModelBinder, ILoggerFactory) |
Creates a new CollectionModelBinder<TElement>. |
CollectionModelBinder<TElement>(IModelBinder) |
Obsolete.
This constructor is obsolete and will be removed in a future version. The recommended alternative is the overload that also takes an ILoggerFactory. Creates a new CollectionModelBinder<TElement>. |
Properties
ElementBinder |
Gets the IModelBinder instances for binding collection elements. |
Logger |
The ILogger used for logging in this binder. |
Methods
AddErrorIfBindingRequired(ModelBindingContext) |
Add a ModelError to ModelState if IsBindingRequired. |
BindModelAsync(ModelBindingContext) |
Attempts to bind a model. |
CanCreateInstance(Type) |
Gets an indication whether or not this ICollectionModelBinder implementation can create
an Object assignable to |
ConvertToCollectionType(Type, IEnumerable<TElement>) |
Gets an Object assignable to |
CopyToModel(Object, IEnumerable<TElement>) |
Adds values from |
CreateEmptyCollection(Type) |
Create an Object assignable to |
CreateInstance(Type) |
Create an instance of |