Megosztás a következőn keresztül:


DictionaryModelBinder<TKey,TValue> Constructors

Definition

Overloads

DictionaryModelBinder<TKey,TValue>(IModelBinder, 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 DictionaryModelBinder<TKey,TValue>.

DictionaryModelBinder<TKey,TValue>(IModelBinder, IModelBinder, ILoggerFactory)

Creates a new DictionaryModelBinder<TKey,TValue>.

DictionaryModelBinder<TKey,TValue>(IModelBinder, IModelBinder, ILoggerFactory, Boolean)

Creates a new DictionaryModelBinder<TKey,TValue>.

DictionaryModelBinder<TKey,TValue>(IModelBinder, IModelBinder, ILoggerFactory, Boolean, MvcOptions)

Creates a new DictionaryModelBinder<TKey,TValue>.

DictionaryModelBinder<TKey,TValue>(IModelBinder, IModelBinder)

Source:
DictionaryModelBinder.cs
Source:
DictionaryModelBinder.cs

Caution

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

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

Parameters

keyBinder
IModelBinder

The IModelBinder for TKey.

valueBinder
IModelBinder

The IModelBinder for TValue.

Attributes

Applies to

DictionaryModelBinder<TKey,TValue>(IModelBinder, IModelBinder, ILoggerFactory)

Source:
DictionaryModelBinder.cs
Source:
DictionaryModelBinder.cs
Source:
DictionaryModelBinder.cs
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)

Parameters

keyBinder
IModelBinder

The IModelBinder for TKey.

valueBinder
IModelBinder

The IModelBinder for TValue.

loggerFactory
ILoggerFactory

The ILoggerFactory.

Remarks

The binder will not add an error for an unbound top-level model even if IsBindingRequired is true.

Applies to

DictionaryModelBinder<TKey,TValue>(IModelBinder, IModelBinder, ILoggerFactory, Boolean)

Source:
DictionaryModelBinder.cs
Source:
DictionaryModelBinder.cs
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)

Parameters

keyBinder
IModelBinder

The IModelBinder for TKey.

valueBinder
IModelBinder

The IModelBinder for TValue.

loggerFactory
ILoggerFactory

The ILoggerFactory.

allowValidatingTopLevelNodes
Boolean

Indication that validation of top-level models is enabled. If true and IsBindingRequired is true for a top-level model, the binder adds a ModelStateDictionary error when the model is not bound.

Remarks

The allowValidatingTopLevelNodes parameter is currently ignored. Microsoft.AspNetCore.Mvc.ModelBinding.Binders.CollectionModelBinder`1.AllowValidatingTopLevelNodes is always false in DictionaryModelBinder<TKey,TValue>. This class ignores that property and unconditionally checks for unbound top-level models with IsBindingRequired.

Applies to

DictionaryModelBinder<TKey,TValue>(IModelBinder, IModelBinder, ILoggerFactory, Boolean, MvcOptions)

Source:
DictionaryModelBinder.cs
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)

Parameters

keyBinder
IModelBinder

The IModelBinder for TKey.

valueBinder
IModelBinder

The IModelBinder for TValue.

loggerFactory
ILoggerFactory

The ILoggerFactory.

allowValidatingTopLevelNodes
Boolean

Indication that validation of top-level models is enabled. If true and IsBindingRequired is true for a top-level model, the binder adds a ModelStateDictionary error when the model is not bound.

mvcOptions
MvcOptions

The MvcOptions.

Remarks

This is the preferred DictionaryModelBinder<TKey,TValue> constructor.

The allowValidatingTopLevelNodes parameter is currently ignored. Microsoft.AspNetCore.Mvc.ModelBinding.Binders.CollectionModelBinder`1.AllowValidatingTopLevelNodes is always false in DictionaryModelBinder<TKey,TValue>. This class ignores that property and unconditionally checks for unbound top-level models with IsBindingRequired.

Applies to