Lenguaje

CollectionModelBinder<TElement> Clase

Definición

IModelBinder implementación para los valores de colección de enlace.

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

Parámetros de tipo

TElement

Tipo de elementos de la colección.

Herencia
CollectionModelBinder<TElement>
Derivado
Implementaciones

Constructores

Nombre Description
CollectionModelBinder<TElement>(IModelBinder)
Obsoletos.

Este constructor está obsoleto y se quitará en una versión futura. La alternativa recomendada es la sobrecarga que también toma .ILoggerFactory

Crea un nuevo CollectionModelBinder<TElement>.

CollectionModelBinder<TElement>(IModelBinder, ILoggerFactory)

Crea un nuevo CollectionModelBinder<TElement>.

CollectionModelBinder<TElement>(IModelBinder, ILoggerFactory, Boolean)

Crea un nuevo CollectionModelBinder<TElement>.

CollectionModelBinder<TElement>(IModelBinder, ILoggerFactory, Boolean, MvcOptions)

Crea un nuevo CollectionModelBinder<TElement>.

Propiedades

Nombre Description
ElementBinder

Obtiene las IModelBinder instancias de los elementos de colección de enlace.

Logger

que ILogger se usa para iniciar sesión en este enlazador.

Métodos

Nombre Description
AddErrorIfBindingRequired(ModelBindingContext)

Agregue a ModelErrorModelState si IsBindingRequired.

BindModelAsync(ModelBindingContext)

Intenta enlazar un modelo.

CanCreateInstance(Type)

Obtiene una indicación de si esta ICollectionModelBinder implementación puede crear o no un Object objeto asignable a targetType.

ConvertToCollectionType(Type, IEnumerable<TElement>)

Obtiene un Object objeto asignable a targetType que contiene miembros de collection.

CopyToModel(Object, IEnumerable<TElement>)

Agrega valores de sourceCollection a dado target.

CreateEmptyCollection(Type)

Cree un Object objeto asignable a targetType.

CreateInstance(Type)

Crea una instancia de targetType.

Se aplica a