ShortFormDictionaryValidationStrategy<TKey, TValue> Class¶
An implementation of Microsoft.AspNetCore.Mvc.ModelBinding.Validation.IValidationStrategy
for a dictionary bound with ‘short form’ style keys.
- Namespace
Microsoft.AspNetCore.Mvc.Internal
- Assemblies
- Microsoft.AspNetCore.Mvc.Core
Syntax¶
public class ShortFormDictionaryValidationStrategy<TKey, TValue> : IValidationStrategy
-
class
Microsoft.AspNetCore.Mvc.Internal.
ShortFormDictionaryValidationStrategy<TKey, TValue>
¶
Constructors¶
-
ShortFormDictionaryValidationStrategy
(System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<System.String, TKey>>, Microsoft.AspNetCore.Mvc.ModelBinding.ModelMetadata)¶ Creates a new
Microsoft.AspNetCore.Mvc.Internal.ShortFormDictionaryValidationStrategy`2
.Arguments: - keyMappings (System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<System.String<System.String>, TKey>>) – The mapping from model prefix key to dictionary key.
- valueMetadata (Microsoft.AspNetCore.Mvc.ModelBinding.ModelMetadata) – The
Microsoft.AspNetCore.Mvc.ModelBinding.ModelMetadata
associated with <em>TValue</em>.
public ShortFormDictionaryValidationStrategy(IEnumerable<KeyValuePair<string, TKey>> keyMappings, ModelMetadata valueMetadata)
-
Methods¶
-
GetChildren
(Microsoft.AspNetCore.Mvc.ModelBinding.ModelMetadata, System.String, System.Object)¶ Return type: System.Collections.Generic.IEnumerator<Microsoft.AspNetCore.Mvc.ModelBinding.Validation.ValidationEntry> public IEnumerator<ValidationEntry> GetChildren(ModelMetadata metadata, string key, object model)
-
Properties¶
-
Microsoft.AspNetCore.Mvc.Internal.ShortFormDictionaryValidationStrategy<TKey, TValue>.
KeyMappings
¶ Gets the mapping from model prefix key to dictionary key.
Return type: System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<System.String<System.String>, TKey>> public IEnumerable<KeyValuePair<string, TKey>> KeyMappings { get; }
-