ValidationStateDictionary Class

Definition

Used for tracking validation state to customize validation behavior for a model object.

C#
public class ValidationStateDictionary : System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<object,Microsoft.AspNetCore.Mvc.ModelBinding.Validation.ValidationStateEntry>>, System.Collections.Generic.IDictionary<object,Microsoft.AspNetCore.Mvc.ModelBinding.Validation.ValidationStateEntry>, System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<object,Microsoft.AspNetCore.Mvc.ModelBinding.Validation.ValidationStateEntry>>, System.Collections.Generic.IReadOnlyCollection<System.Collections.Generic.KeyValuePair<object,Microsoft.AspNetCore.Mvc.ModelBinding.Validation.ValidationStateEntry>>, System.Collections.Generic.IReadOnlyDictionary<object,Microsoft.AspNetCore.Mvc.ModelBinding.Validation.ValidationStateEntry>
Inheritance
ValidationStateDictionary
Implements

Constructors

Properties

Count

Gets the number of elements contained in the ICollection<T>.

IsReadOnly

Gets a value indicating whether the ICollection<T> is read-only.

Item[Object]

Gets or sets the element with the specified key.

Keys

Gets an ICollection<T> containing the keys of the IDictionary<TKey,TValue>.

Values

Gets an ICollection<T> containing the values in the IDictionary<TKey,TValue>.

Methods

Add(KeyValuePair<Object,ValidationStateEntry>)

Adds an item to the ICollection<T>.

Add(Object, ValidationStateEntry)

Adds an element with the provided key and value to the IDictionary<TKey,TValue>.

Clear()

Removes all items from the ICollection<T>.

Contains(KeyValuePair<Object,ValidationStateEntry>)

Determines whether the ICollection<T> contains a specific value.

ContainsKey(Object)

Determines whether the IDictionary<TKey,TValue> contains an element with the specified key.

CopyTo(KeyValuePair<Object,ValidationStateEntry>[], Int32)

Copies the elements of the ICollection<T> to an Array, starting at a particular Array index.

GetEnumerator()

Returns an enumerator that iterates through the collection.

Remove(KeyValuePair<Object,ValidationStateEntry>)

Removes the first occurrence of a specific object from the ICollection<T>.

Remove(Object)

Removes the element with the specified key from the IDictionary<TKey,TValue>.

TryGetValue(Object, ValidationStateEntry) System.Object.TryGetValue(System.Object,Microsoft.AspNetCore.Mvc.ModelBinding.Validation.ValidationStateEntry@)

Explicit Interface Implementations

IDictionary<Object,ValidationStateEntry>.Item[Object]

Gets or sets the element with the specified key.

IEnumerable.GetEnumerator()

Returns an enumerator that iterates through a collection.

IReadOnlyDictionary<Object,ValidationStateEntry>.Item[Object]
IReadOnlyDictionary<Object,ValidationStateEntry>.Keys

Gets an enumerable collection that contains the keys in the read-only dictionary.

IReadOnlyDictionary<Object,ValidationStateEntry>.Values

Gets an enumerable collection that contains the values in the read-only dictionary.

Applies to

Product Versions
ASP.NET Core 1.0, 1.1, 2.0, 2.1, 2.2, 3.0, 3.1, 5.0, 6.0, 7.0, 8.0, 9.0