DictionaryModelBinder<TKey,TValue> Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
IModelBinder implementation for binding dictionary values.
generic <typename TKey, typename TValue>
public ref class DictionaryModelBinder : Microsoft::AspNetCore::Mvc::ModelBinding::Binders::CollectionModelBinder<System::Collections::Generic::KeyValuePair<TKey, TValue>>
public class DictionaryModelBinder<TKey,TValue> : Microsoft.AspNetCore.Mvc.ModelBinding.Binders.CollectionModelBinder<System.Collections.Generic.KeyValuePair<TKey,TValue>>
type DictionaryModelBinder<'Key, 'Value> = class
inherit CollectionModelBinder<KeyValuePair<'Key, 'Value>>
Public Class DictionaryModelBinder(Of TKey, TValue)
Inherits CollectionModelBinder(Of KeyValuePair(Of TKey, TValue))
Type Parameters
- TKey
Type of keys in the dictionary.
- TValue
Type of values in the dictionary.
- Inheritance
Constructors
DictionaryModelBinder<TKey,TValue>(IModelBinder, IModelBinder, ILoggerFactory, Boolean, MvcOptions) |
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) |
Creates a new DictionaryModelBinder<TKey,TValue>. |
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>. |
Properties
ElementBinder |
Gets the IModelBinder instances for binding collection elements. (Inherited from CollectionModelBinder<TElement>) |
Logger |
The ILogger used for logging in this binder. (Inherited from CollectionModelBinder<TElement>) |
Methods
AddErrorIfBindingRequired(ModelBindingContext) |
Add a ModelError to ModelState if IsBindingRequired. (Inherited from CollectionModelBinder<TElement>) |
BindModelAsync(ModelBindingContext) |
Attempts to bind a model. |
CanCreateInstance(Type) |
Gets an indication whether or not this ICollectionModelBinder implementation can create
an Object assignable to |
ConvertToCollectionType(Type, IEnumerable<KeyValuePair<TKey,TValue>>) | System.Object.ConvertToCollectionType(System.Type,System.Collections.Generic.IEnumerable{System.Collections.Generic.KeyValuePair{`0,`1}}) |
ConvertToCollectionType(Type, IEnumerable<TElement>) |
Gets an Object assignable to |
CopyToModel(Object, IEnumerable<TElement>) |
Adds values from |
CreateEmptyCollection(Type) |
Create an Object assignable to |
CreateInstance(Type) |
Create an instance of |