Click or drag to resize
MultiValueDictionaryTKey, TValue Class
Extension to the normal Dictionary. This class can store more than one value for every key. It keeps a HashSet for every Key value. Calling Add with the same Key and multiple values will store each value under the same Key in the Dictionary. Obtaining the values for a Key will return the HashSet with the Values of the Key. It can also merge with other instances of MultiValueDictionary, as long as the TKey and TValue types are equal.
Inheritance Hierarchy
SystemObject
  System.Collections.GenericDictionaryTKey, HashSetTValue
    SD.LLBLGen.Pro.ORMSupportClassesMultiValueDictionaryTKey, TValue

Namespace: SD.LLBLGen.Pro.ORMSupportClasses
Assembly: SD.LLBLGen.Pro.ORMSupportClasses (in SD.LLBLGen.Pro.ORMSupportClasses.dll) Version: 5.0.0.0 (5.0.0)
Syntax
[SerializableAttribute]
public class MultiValueDictionary<TKey, TValue> : Dictionary<TKey, HashSet<TValue>>

Type Parameters

TKey
The type of the key.
TValue
The type of the value.

The MultiValueDictionaryTKey, TValue type exposes the following members.

Constructors
  NameDescription
Public methodMultiValueDictionaryTKey, TValue
Initializes a new instance of the MultiValueDictionaryTKey, TValue class.
Public methodMultiValueDictionaryTKey, TValue(IEqualityComparerTValue)
Initializes a new instance of the MultiValueDictionaryTKey, TValue class.
Protected methodMultiValueDictionaryTKey, TValue(SerializationInfo, StreamingContext)
Initializes a new instance of the MultiValueDictionaryTKey, TValue class.
Top
Properties
  NameDescription
Public propertyComparer (Inherited from DictionaryTKey, HashSetTValue.)
Public propertyCount (Inherited from DictionaryTKey, HashSetTValue.)
Public propertyItem (Inherited from DictionaryTKey, HashSetTValue.)
Public propertyKeys (Inherited from DictionaryTKey, HashSetTValue.)
Public propertyValues (Inherited from DictionaryTKey, HashSetTValue.)
Top
Methods
  NameDescription
Public methodAdd(TKey, TValue) (Inherited from DictionaryTKey, HashSetTValue.)
Public methodAdd(TKey, TValue)
Adds the specified value under the specified key
Public methodAddRange
Adds the range of values under the key specified.
Public methodClear (Inherited from DictionaryTKey, HashSetTValue.)
Public methodContainsKey (Inherited from DictionaryTKey, HashSetTValue.)
Public methodContainsValue(TValue) (Inherited from DictionaryTKey, HashSetTValue.)
Public methodContainsValue(TKey, TValue)
Determines whether this dictionary contains the specified value for the specified key
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetEnumerator (Inherited from DictionaryTKey, HashSetTValue.)
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetObjectData
Gets the object data.
(Overrides DictionaryTKey, TValueGetObjectData(SerializationInfo, StreamingContext).)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodGetValues
Gets the values for the key specified. This method is useful if you want to avoid an exception for key value retrieval and you can't use TryGetValue (e.g. in lambdas)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodMerge
Merges the specified multivaluedictionary into this instance.
Public methodOnDeserialization
Implements the ISerializable interface and raises the deserialization event when the deserialization is complete.
(Inherited from DictionaryTKey, HashSetTValue.)
Public methodRemove(TKey) (Inherited from DictionaryTKey, HashSetTValue.)
Public methodRemove(TKey, TValue)
Removes the specified value for the specified key. It will leave the key in the dictionary.
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Public methodTryGetValue (Inherited from DictionaryTKey, HashSetTValue.)
Top
Explicit Interface Implementations
  NameDescription
Explicit interface implementationPrivate methodICollectionKeyValuePairTKey, TValueAdd (Inherited from DictionaryTKey, HashSetTValue.)
Explicit interface implementationPrivate methodIDictionaryAdd (Inherited from DictionaryTKey, HashSetTValue.)
Explicit interface implementationPrivate methodICollectionKeyValuePairTKey, TValueContains (Inherited from DictionaryTKey, HashSetTValue.)
Explicit interface implementationPrivate methodIDictionaryContains (Inherited from DictionaryTKey, HashSetTValue.)
Explicit interface implementationPrivate methodICollectionKeyValuePairTKey, TValueCopyTo (Inherited from DictionaryTKey, HashSetTValue.)
Explicit interface implementationPrivate methodICollectionCopyTo (Inherited from DictionaryTKey, HashSetTValue.)
Explicit interface implementationPrivate methodIEnumerableKeyValuePairTKey, TValueGetEnumerator (Inherited from DictionaryTKey, HashSetTValue.)
Explicit interface implementationPrivate methodIEnumerableGetEnumerator (Inherited from DictionaryTKey, HashSetTValue.)
Explicit interface implementationPrivate methodIDictionaryGetEnumerator (Inherited from DictionaryTKey, HashSetTValue.)
Explicit interface implementationPrivate propertyIDictionaryIsFixedSize (Inherited from DictionaryTKey, HashSetTValue.)
Explicit interface implementationPrivate propertyICollectionKeyValuePairTKey, TValueIsReadOnly (Inherited from DictionaryTKey, HashSetTValue.)
Explicit interface implementationPrivate propertyIDictionaryIsReadOnly (Inherited from DictionaryTKey, HashSetTValue.)
Explicit interface implementationPrivate propertyICollectionIsSynchronized (Inherited from DictionaryTKey, HashSetTValue.)
Explicit interface implementationPrivate propertyIDictionaryItem (Inherited from DictionaryTKey, HashSetTValue.)
Explicit interface implementationPrivate propertyIDictionaryTKey, TValueKeys (Inherited from DictionaryTKey, HashSetTValue.)
Explicit interface implementationPrivate propertyIReadOnlyDictionaryTKey, TValueKeys (Inherited from DictionaryTKey, HashSetTValue.)
Explicit interface implementationPrivate propertyIDictionaryKeys (Inherited from DictionaryTKey, HashSetTValue.)
Explicit interface implementationPrivate methodICollectionKeyValuePairTKey, TValueRemove (Inherited from DictionaryTKey, HashSetTValue.)
Explicit interface implementationPrivate methodIDictionaryRemove (Inherited from DictionaryTKey, HashSetTValue.)
Explicit interface implementationPrivate propertyICollectionSyncRoot (Inherited from DictionaryTKey, HashSetTValue.)
Explicit interface implementationPrivate propertyIDictionaryTKey, TValueValues (Inherited from DictionaryTKey, HashSetTValue.)
Explicit interface implementationPrivate propertyIReadOnlyDictionaryTKey, TValueValues (Inherited from DictionaryTKey, HashSetTValue.)
Explicit interface implementationPrivate propertyIDictionaryValues (Inherited from DictionaryTKey, HashSetTValue.)
Top
See Also