DictionaryModelBinder<TKey,TValue> Constructores
Definición
Importante
Parte de la información hace referencia a la versión preliminar del producto, que puede haberse modificado sustancialmente antes de lanzar la versión definitiva. Microsoft no otorga ninguna garantía, explícita o implícita, con respecto a la información proporcionada aquí.
Sobrecargas
DictionaryModelBinder<TKey,TValue>(IModelBinder, 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 DictionaryModelBinder<TKey,TValue>. |
DictionaryModelBinder<TKey,TValue>(IModelBinder, IModelBinder, ILoggerFactory) |
Crea un nuevo DictionaryModelBinder<TKey,TValue>. |
DictionaryModelBinder<TKey,TValue>(IModelBinder, IModelBinder, ILoggerFactory, Boolean) |
Crea un nuevo DictionaryModelBinder<TKey,TValue>. |
DictionaryModelBinder<TKey,TValue>(IModelBinder, IModelBinder, ILoggerFactory, Boolean, MvcOptions) |
Crea un nuevo DictionaryModelBinder<TKey,TValue>. |
DictionaryModelBinder<TKey,TValue>(IModelBinder, IModelBinder)
- Source:
- DictionaryModelBinder.cs
- Source:
- DictionaryModelBinder.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 DictionaryModelBinder<TKey,TValue>.
public:
DictionaryModelBinder(Microsoft::AspNetCore::Mvc::ModelBinding::IModelBinder ^ keyBinder, Microsoft::AspNetCore::Mvc::ModelBinding::IModelBinder ^ valueBinder);
public DictionaryModelBinder (Microsoft.AspNetCore.Mvc.ModelBinding.IModelBinder keyBinder, Microsoft.AspNetCore.Mvc.ModelBinding.IModelBinder valueBinder);
[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 DictionaryModelBinder (Microsoft.AspNetCore.Mvc.ModelBinding.IModelBinder keyBinder, Microsoft.AspNetCore.Mvc.ModelBinding.IModelBinder valueBinder);
new Microsoft.AspNetCore.Mvc.ModelBinding.Binders.DictionaryModelBinder<'Key, 'Value> : Microsoft.AspNetCore.Mvc.ModelBinding.IModelBinder * Microsoft.AspNetCore.Mvc.ModelBinding.IModelBinder -> Microsoft.AspNetCore.Mvc.ModelBinding.Binders.DictionaryModelBinder<'Key, 'Value>
[<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.DictionaryModelBinder<'Key, 'Value> : Microsoft.AspNetCore.Mvc.ModelBinding.IModelBinder * Microsoft.AspNetCore.Mvc.ModelBinding.IModelBinder -> Microsoft.AspNetCore.Mvc.ModelBinding.Binders.DictionaryModelBinder<'Key, 'Value>
Public Sub New (keyBinder As IModelBinder, valueBinder As IModelBinder)
Parámetros
- keyBinder
- IModelBinder
El objeto IModelBinder para TKey
.
- valueBinder
- IModelBinder
El objeto IModelBinder para TValue
.
- Atributos
Se aplica a
DictionaryModelBinder<TKey,TValue>(IModelBinder, IModelBinder, ILoggerFactory)
- Source:
- DictionaryModelBinder.cs
- Source:
- DictionaryModelBinder.cs
- Source:
- DictionaryModelBinder.cs
Crea un nuevo DictionaryModelBinder<TKey,TValue>.
public:
DictionaryModelBinder(Microsoft::AspNetCore::Mvc::ModelBinding::IModelBinder ^ keyBinder, Microsoft::AspNetCore::Mvc::ModelBinding::IModelBinder ^ valueBinder, Microsoft::Extensions::Logging::ILoggerFactory ^ loggerFactory);
public DictionaryModelBinder (Microsoft.AspNetCore.Mvc.ModelBinding.IModelBinder keyBinder, Microsoft.AspNetCore.Mvc.ModelBinding.IModelBinder valueBinder, Microsoft.Extensions.Logging.ILoggerFactory loggerFactory);
new Microsoft.AspNetCore.Mvc.ModelBinding.Binders.DictionaryModelBinder<'Key, 'Value> : Microsoft.AspNetCore.Mvc.ModelBinding.IModelBinder * Microsoft.AspNetCore.Mvc.ModelBinding.IModelBinder * Microsoft.Extensions.Logging.ILoggerFactory -> Microsoft.AspNetCore.Mvc.ModelBinding.Binders.DictionaryModelBinder<'Key, 'Value>
Public Sub New (keyBinder As IModelBinder, valueBinder As IModelBinder, loggerFactory As ILoggerFactory)
Parámetros
- keyBinder
- IModelBinder
El objeto IModelBinder para TKey
.
- valueBinder
- IModelBinder
El objeto IModelBinder para TValue
.
- loggerFactory
- ILoggerFactory
Comentarios
El enlazador no agregará un error para un modelo de nivel superior independiente, incluso si IsBindingRequired es true
.
Se aplica a
DictionaryModelBinder<TKey,TValue>(IModelBinder, IModelBinder, ILoggerFactory, Boolean)
- Source:
- DictionaryModelBinder.cs
- Source:
- DictionaryModelBinder.cs
Crea un nuevo DictionaryModelBinder<TKey,TValue>.
public:
DictionaryModelBinder(Microsoft::AspNetCore::Mvc::ModelBinding::IModelBinder ^ keyBinder, Microsoft::AspNetCore::Mvc::ModelBinding::IModelBinder ^ valueBinder, Microsoft::Extensions::Logging::ILoggerFactory ^ loggerFactory, bool allowValidatingTopLevelNodes);
public DictionaryModelBinder (Microsoft.AspNetCore.Mvc.ModelBinding.IModelBinder keyBinder, Microsoft.AspNetCore.Mvc.ModelBinding.IModelBinder valueBinder, Microsoft.Extensions.Logging.ILoggerFactory loggerFactory, bool allowValidatingTopLevelNodes);
new Microsoft.AspNetCore.Mvc.ModelBinding.Binders.DictionaryModelBinder<'Key, 'Value> : Microsoft.AspNetCore.Mvc.ModelBinding.IModelBinder * Microsoft.AspNetCore.Mvc.ModelBinding.IModelBinder * Microsoft.Extensions.Logging.ILoggerFactory * bool -> Microsoft.AspNetCore.Mvc.ModelBinding.Binders.DictionaryModelBinder<'Key, 'Value>
Public Sub New (keyBinder As IModelBinder, valueBinder As IModelBinder, loggerFactory As ILoggerFactory, allowValidatingTopLevelNodes As Boolean)
Parámetros
- keyBinder
- IModelBinder
El objeto IModelBinder para TKey
.
- valueBinder
- IModelBinder
El objeto IModelBinder para TValue
.
- loggerFactory
- ILoggerFactory
- allowValidatingTopLevelNodes
- Boolean
Indicación de que está habilitada la validación de modelos de nivel superior. Si true
y IsBindingRequired es true
para un modelo de nivel superior, el enlazador agrega un ModelStateDictionary error cuando el modelo no está enlazado.
Comentarios
El allowValidatingTopLevelNodes
parámetro se omite actualmente.
Microsoft.AspNetCore.Mvc.ModelBinding.Binders.CollectionModelBinder`1.AllowValidatingTopLevelNodes siempre false
está en DictionaryModelBinder<TKey,TValue>. Esta clase omite esa propiedad y comprueba incondicionalmente los modelos de nivel superior sin enlazar con IsBindingRequired.
Se aplica a
DictionaryModelBinder<TKey,TValue>(IModelBinder, IModelBinder, ILoggerFactory, Boolean, MvcOptions)
- Source:
- DictionaryModelBinder.cs
Crea un nuevo DictionaryModelBinder<TKey,TValue>.
public:
DictionaryModelBinder(Microsoft::AspNetCore::Mvc::ModelBinding::IModelBinder ^ keyBinder, Microsoft::AspNetCore::Mvc::ModelBinding::IModelBinder ^ valueBinder, Microsoft::Extensions::Logging::ILoggerFactory ^ loggerFactory, bool allowValidatingTopLevelNodes, Microsoft::AspNetCore::Mvc::MvcOptions ^ mvcOptions);
public DictionaryModelBinder (Microsoft.AspNetCore.Mvc.ModelBinding.IModelBinder keyBinder, Microsoft.AspNetCore.Mvc.ModelBinding.IModelBinder valueBinder, Microsoft.Extensions.Logging.ILoggerFactory loggerFactory, bool allowValidatingTopLevelNodes, Microsoft.AspNetCore.Mvc.MvcOptions mvcOptions);
new Microsoft.AspNetCore.Mvc.ModelBinding.Binders.DictionaryModelBinder<'Key, 'Value> : Microsoft.AspNetCore.Mvc.ModelBinding.IModelBinder * Microsoft.AspNetCore.Mvc.ModelBinding.IModelBinder * Microsoft.Extensions.Logging.ILoggerFactory * bool * Microsoft.AspNetCore.Mvc.MvcOptions -> Microsoft.AspNetCore.Mvc.ModelBinding.Binders.DictionaryModelBinder<'Key, 'Value>
Public Sub New (keyBinder As IModelBinder, valueBinder As IModelBinder, loggerFactory As ILoggerFactory, allowValidatingTopLevelNodes As Boolean, mvcOptions As MvcOptions)
Parámetros
- keyBinder
- IModelBinder
El objeto IModelBinder para TKey
.
- valueBinder
- IModelBinder
El objeto IModelBinder para TValue
.
- loggerFactory
- ILoggerFactory
- allowValidatingTopLevelNodes
- Boolean
Indicación de que está habilitada la validación de modelos de nivel superior. 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
Comentarios
Este es el constructor preferido DictionaryModelBinder<TKey,TValue> .
El allowValidatingTopLevelNodes
parámetro se omite actualmente.
Microsoft.AspNetCore.Mvc.ModelBinding.Binders.CollectionModelBinder`1.AllowValidatingTopLevelNodes siempre false
está en DictionaryModelBinder<TKey,TValue>. Esta clase omite esa propiedad y comprueba incondicionalmente los modelos de nivel superior sin enlazar con IsBindingRequired.