Compartir a través de


CollectionModelBinder<TElement> Constructores

Definición

Sobrecargas

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>.

CollectionModelBinder<TElement>(IModelBinder)

Source:
CollectionModelBinder.cs
Source:
CollectionModelBinder.cs

Precaución

This constructor is obsolete and will be removed in a future version. The recommended alternative is the overload that also takes an ILoggerFactory.

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>.

public:
 CollectionModelBinder(Microsoft::AspNetCore::Mvc::ModelBinding::IModelBinder ^ elementBinder);
public CollectionModelBinder (Microsoft.AspNetCore.Mvc.ModelBinding.IModelBinder elementBinder);
[System.Obsolete("This constructor is obsolete and will be removed in a future version. The recommended alternative is the overload that also takes an ILoggerFactory.")]
public CollectionModelBinder (Microsoft.AspNetCore.Mvc.ModelBinding.IModelBinder elementBinder);
new Microsoft.AspNetCore.Mvc.ModelBinding.Binders.CollectionModelBinder<'Element> : Microsoft.AspNetCore.Mvc.ModelBinding.IModelBinder -> Microsoft.AspNetCore.Mvc.ModelBinding.Binders.CollectionModelBinder<'Element>
[<System.Obsolete("This constructor is obsolete and will be removed in a future version. The recommended alternative is the overload that also takes an ILoggerFactory.")>]
new Microsoft.AspNetCore.Mvc.ModelBinding.Binders.CollectionModelBinder<'Element> : Microsoft.AspNetCore.Mvc.ModelBinding.IModelBinder -> Microsoft.AspNetCore.Mvc.ModelBinding.Binders.CollectionModelBinder<'Element>
Public Sub New (elementBinder As IModelBinder)

Parámetros

elementBinder
IModelBinder

para los elementos de IModelBinder enlace.

Atributos

Se aplica a

CollectionModelBinder<TElement>(IModelBinder, ILoggerFactory)

Source:
CollectionModelBinder.cs
Source:
CollectionModelBinder.cs
Source:
CollectionModelBinder.cs
public:
 CollectionModelBinder(Microsoft::AspNetCore::Mvc::ModelBinding::IModelBinder ^ elementBinder, Microsoft::Extensions::Logging::ILoggerFactory ^ loggerFactory);
public CollectionModelBinder (Microsoft.AspNetCore.Mvc.ModelBinding.IModelBinder elementBinder, Microsoft.Extensions.Logging.ILoggerFactory loggerFactory);
new Microsoft.AspNetCore.Mvc.ModelBinding.Binders.CollectionModelBinder<'Element> : Microsoft.AspNetCore.Mvc.ModelBinding.IModelBinder * Microsoft.Extensions.Logging.ILoggerFactory -> Microsoft.AspNetCore.Mvc.ModelBinding.Binders.CollectionModelBinder<'Element>
Public Sub New (elementBinder As IModelBinder, loggerFactory As ILoggerFactory)

Parámetros

elementBinder
IModelBinder

IModelBinder para enlazar TElement.

Comentarios

El enlazador no agregará un error para un modelo de nivel superior independiente aunque IsBindingRequired sea true.

Se aplica a

CollectionModelBinder<TElement>(IModelBinder, ILoggerFactory, Boolean)

Source:
CollectionModelBinder.cs
Source:
CollectionModelBinder.cs
public:
 CollectionModelBinder(Microsoft::AspNetCore::Mvc::ModelBinding::IModelBinder ^ elementBinder, Microsoft::Extensions::Logging::ILoggerFactory ^ loggerFactory, bool allowValidatingTopLevelNodes);
public CollectionModelBinder (Microsoft.AspNetCore.Mvc.ModelBinding.IModelBinder elementBinder, Microsoft.Extensions.Logging.ILoggerFactory loggerFactory, bool allowValidatingTopLevelNodes);
new Microsoft.AspNetCore.Mvc.ModelBinding.Binders.CollectionModelBinder<'Element> : Microsoft.AspNetCore.Mvc.ModelBinding.IModelBinder * Microsoft.Extensions.Logging.ILoggerFactory * bool -> Microsoft.AspNetCore.Mvc.ModelBinding.Binders.CollectionModelBinder<'Element>
Public Sub New (elementBinder As IModelBinder, loggerFactory As ILoggerFactory, allowValidatingTopLevelNodes As Boolean)

Parámetros

elementBinder
IModelBinder

IModelBinder para enlazar TElement.

allowValidatingTopLevelNodes
Boolean

Indicación de que la validación de modelos de nivel superior está habilitada. Si true y IsBindingRequired es true para un modelo de nivel superior, el enlazador agrega un ModelStateDictionary error cuando el modelo no está enlazado.

Se aplica a

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

Source:
CollectionModelBinder.cs
public:
 CollectionModelBinder(Microsoft::AspNetCore::Mvc::ModelBinding::IModelBinder ^ elementBinder, Microsoft::Extensions::Logging::ILoggerFactory ^ loggerFactory, bool allowValidatingTopLevelNodes, Microsoft::AspNetCore::Mvc::MvcOptions ^ mvcOptions);
public CollectionModelBinder (Microsoft.AspNetCore.Mvc.ModelBinding.IModelBinder elementBinder, Microsoft.Extensions.Logging.ILoggerFactory loggerFactory, bool allowValidatingTopLevelNodes, Microsoft.AspNetCore.Mvc.MvcOptions mvcOptions);
new Microsoft.AspNetCore.Mvc.ModelBinding.Binders.CollectionModelBinder<'Element> : Microsoft.AspNetCore.Mvc.ModelBinding.IModelBinder * Microsoft.Extensions.Logging.ILoggerFactory * bool * Microsoft.AspNetCore.Mvc.MvcOptions -> Microsoft.AspNetCore.Mvc.ModelBinding.Binders.CollectionModelBinder<'Element>
Public Sub New (elementBinder As IModelBinder, loggerFactory As ILoggerFactory, allowValidatingTopLevelNodes As Boolean, mvcOptions As MvcOptions)

Parámetros

elementBinder
IModelBinder

IModelBinder para enlazar TElement.

allowValidatingTopLevelNodes
Boolean

Indicación de que la validación de modelos de nivel superior está habilitada. Si true y IsBindingRequired es true para un modelo de nivel superior, el enlazador agrega un ModelStateDictionary error cuando el modelo no está enlazado.

mvcOptions
MvcOptions

MvcOptions.

Comentarios

Este es el constructor preferido CollectionModelBinder<TElement> .

Se aplica a