Partilhar via


CollectionModelBinder<TElement> Construtores

Definição

Sobrecargas

CollectionModelBinder<TElement>(IModelBinder)
Obsoleto.

Esse construtor está obsoleto e será removido em uma versão futura. A alternativa recomendada é a sobrecarga que também usa um ILoggerFactory.

Cria um novo CollectionModelBinder<TElement>.

CollectionModelBinder<TElement>(IModelBinder, ILoggerFactory)

Cria um novo CollectionModelBinder<TElement>.

CollectionModelBinder<TElement>(IModelBinder, ILoggerFactory, Boolean)

Cria um novo CollectionModelBinder<TElement>.

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

Cria um novo CollectionModelBinder<TElement>.

CollectionModelBinder<TElement>(IModelBinder)

Origem:
CollectionModelBinder.cs
Origem:
CollectionModelBinder.cs

Cuidado

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

Esse construtor está obsoleto e será removido em uma versão futura. A alternativa recomendada é a sobrecarga que também usa um ILoggerFactory.

Cria um novo 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

O IModelBinder para elementos de associação.

Atributos

Aplica-se a

CollectionModelBinder<TElement>(IModelBinder, ILoggerFactory)

Origem:
CollectionModelBinder.cs
Origem:
CollectionModelBinder.cs
Origem:
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

O IModelBinder para associação TElement.

loggerFactory
ILoggerFactory

O ILoggerFactory.

Comentários

O associador não adicionará um erro para um modelo de nível superior não associado, mesmo que IsBindingRequired seja true.

Aplica-se a

CollectionModelBinder<TElement>(IModelBinder, ILoggerFactory, Boolean)

Origem:
CollectionModelBinder.cs
Origem:
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

O IModelBinder para associação TElement.

loggerFactory
ILoggerFactory

O ILoggerFactory.

allowValidatingTopLevelNodes
Boolean

Indicação de que a validação de modelos de nível superior está habilitada. Se true e IsBindingRequired for true para um modelo de nível superior, o associador adicionará um ModelStateDictionary erro quando o modelo não estiver associado.

Aplica-se a

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

Origem:
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

O IModelBinder para associação TElement.

loggerFactory
ILoggerFactory

O ILoggerFactory.

allowValidatingTopLevelNodes
Boolean

Indicação de que a validação de modelos de nível superior está habilitada. Se true e IsBindingRequired for true para um modelo de nível superior, o associador adicionará um ModelStateDictionary erro quando o modelo não estiver associado.

mvcOptions
MvcOptions

O MvcOptions.

Comentários

Esse é o construtor preferencial CollectionModelBinder<TElement> .

Aplica-se a