PeanutButter
Loading...
Searching...
No Matches
PeanutButter.Utils.Dictionaries.ValidatingDictionary< TKey, TValue > Class Template Reference

Provides a dictionary implementation which allows for a validation action for keys, values and pairs. More...

Inheritance diagram for PeanutButter.Utils.Dictionaries.ValidatingDictionary< TKey, TValue >:

Public Member Functions

 ValidatingDictionary (Action< IDictionary< TKey, TValue >, TKey, TValue, Mutation > validator)
 Construct a validating dictionary with a validator and use the default equality comparer for key lookups.
 ValidatingDictionary (Action< IDictionary< TKey, TValue >, TKey, TValue, Mutation > validator, IEqualityComparer< TKey > equalityComparer)
 Construct the validating dictionary with a validator and an equality comparer to use for key lookups.
IEnumerator< KeyValuePair< TKey, TValue > > GetEnumerator ()
void Add (KeyValuePair< TKey, TValue > item)
void Clear ()
bool Contains (KeyValuePair< TKey, TValue > item)
void CopyTo (KeyValuePair< TKey, TValue >[] array, int arrayIndex)
bool Remove (KeyValuePair< TKey, TValue > item)
bool ContainsKey (TKey key)
void Add (TKey key, TValue value)
bool Remove (TKey key)
bool TryGetValue (TKey key, out TValue value)

Properties

int Count [get]
bool IsReadOnly [get]
TValue this[TKey key] [get, set]
ICollection< TKey > Keys [get]
ICollection< TValue > Values [get]

Detailed Description

Provides a dictionary implementation which allows for a validation action for keys, values and pairs.

Member Function Documentation

◆ ValidatingDictionary() [1/2]

PeanutButter.Utils.Dictionaries.ValidatingDictionary< TKey, TValue >.ValidatingDictionary ( Action< IDictionary< TKey, TValue >, TKey, TValue, Mutation > validator)

Construct a validating dictionary with a validator and use the default equality comparer for key lookups.

Parameters
validator

◆ ValidatingDictionary() [2/2]

PeanutButter.Utils.Dictionaries.ValidatingDictionary< TKey, TValue >.ValidatingDictionary ( Action< IDictionary< TKey, TValue >, TKey, TValue, Mutation > validator,
IEqualityComparer< TKey > equalityComparer )

Construct the validating dictionary with a validator and an equality comparer to use for key lookups.

Parameters
validator
equalityComparer

The documentation for this class was generated from the following file:
  • source/Utils/PeanutButter.Utils/Dictionaries/ValidatingDictionary.cs