Multi-valued dictionary: Each key maps to a set of keys
More...
Inherits IEquatable< MultiValueDictionary< TKey, TValue >>, and IEnumerable< KeyValuePair< TKey, ISet< TValue >>>.
|
override string | ToString () |
| Returns a string representation of this MultiValueDictionary More...
|
|
bool | Add (TKey key, TValue value) |
| Adds new (key, value) pair to this MultiValueDictionary More...
|
|
ISet< TValue > | Get (TKey key) |
| Returns the set of values associated with this key More...
|
|
bool | Remove (TKey key, TValue value) |
| Removes a (key, value) pair from this dictionary. If the set of values is now empty, the key must be removed More...
|
|
bool | ContainsKey (TKey key) |
| Returns true if this dictionary contains the specified key More...
|
|
IEnumerator< KeyValuePair
< TKey, ISet< TValue > > > | GetEnumerator () |
| Returns an enumerator over this dictionary More...
|
|
bool | TryGetValue (TKey key, out ISet< TValue > values) |
| Try to get the values associated with the specified key More...
|
|
int | AddAll (ISet< TKey > keys, TValue value) |
| For each key in keys add the (key, value) pair to the dictionary. More...
|
|
int | RemoveAll (TValue value) |
| Remove all occurrences of this value from the dictionary. If a value set becomes empty the associated key must be removed from the dictionary More...
|
|
bool | Equals (MultiValueDictionary< TKey, TValue > other) |
| Compares two MultiValueDictionary objects. Defined by the interface IEquatable<MultiValueDictionary<TKey, TValue>> More...
|
|
override bool | Equals (object obj) |
| Compares this dictionary to another object More...
|
|
override int | GetHashCode () |
| Gets the hash code of this dictionary. If two dictionaries are equal they must have the same hash codes. More...
|
|
|
int | Count [get] |
| The number of keys in this MultiValueDictionary More...
|
|
ICollection< TKey > | Keys [get] |
| Read-only property. Gets all the keys from this dictionary More...
|
|
ICollection< ISet< TValue > > | Values [get] |
| Read-only property. Get all the values of this dictionary. More...
|
|
Multi-valued dictionary: Each key maps to a set of keys
- Template Parameters
-
TKey | The type of the key |
TValue | The type of the values |
bool MyCollections.MultiValueDictionary< TKey, TValue >.Add |
( |
TKey |
key, |
|
|
TValue |
value |
|
) |
| |
Adds new (key, value) pair to this MultiValueDictionary
- Parameters
-
- Returns
- true if the (key, value) pair was added, false if it was a duplicate
- Exceptions
-
ArgumentNullException | if key or value is null |
int MyCollections.MultiValueDictionary< TKey, TValue >.AddAll |
( |
ISet< TKey > |
keys, |
|
|
TValue |
value |
|
) |
| |
For each key in keys add the (key, value) pair to the dictionary.
- Parameters
-
keys | the keys |
value | the value |
- Returns
- the number of elements added to this dictionary
- Exceptions
-
ArgumentNullException | if keys or value is null |
bool MyCollections.MultiValueDictionary< TKey, TValue >.ContainsKey |
( |
TKey |
key | ) |
|
Returns true if this dictionary contains the specified key
- Parameters
-
- Returns
- true if this dictionary contains the specified key, false otherwise
bool MyCollections.MultiValueDictionary< TKey, TValue >.Equals |
( |
MultiValueDictionary< TKey, TValue > |
other | ) |
|
Compares two MultiValueDictionary objects. Defined by the interface IEquatable<MultiValueDictionary<TKey, TValue>>
- Parameters
-
other | the dictionary to compare to |
- Returns
- true if the dictionaries have the same keys, and for each key have the same values
override bool MyCollections.MultiValueDictionary< TKey, TValue >.Equals |
( |
object |
obj | ) |
|
Compares this dictionary to another object
- Parameters
-
obj | the object to compare to |
- Returns
- returns true if obj is a MultiValueDictionary which is equals to this dictionary
ISet<TValue> MyCollections.MultiValueDictionary< TKey, TValue >.Get |
( |
TKey |
key | ) |
|
Returns the set of values associated with this key
- Parameters
-
- Returns
- the set of values associated with this key, or null if this key is not in the dictionary
- Exceptions
-
ArgumentNullException | if key is null |
IEnumerator<KeyValuePair<TKey, ISet<TValue> > > MyCollections.MultiValueDictionary< TKey, TValue >.GetEnumerator |
( |
| ) |
|
Returns an enumerator over this dictionary
- Returns
- an enumerator over this dictionary
override int MyCollections.MultiValueDictionary< TKey, TValue >.GetHashCode |
( |
| ) |
|
Gets the hash code of this dictionary. If two dictionaries are equal they must have the same hash codes.
- Returns
bool MyCollections.MultiValueDictionary< TKey, TValue >.Remove |
( |
TKey |
key, |
|
|
TValue |
value |
|
) |
| |
Removes a (key, value) pair from this dictionary. If the set of values is now empty, the key must be removed
- Parameters
-
key | the key |
value | the value |
- Returns
- true if an element was removed
- Exceptions
-
ArgumentNullException | if key or value is null |
int MyCollections.MultiValueDictionary< TKey, TValue >.RemoveAll |
( |
TValue |
value | ) |
|
Remove all occurrences of this value from the dictionary. If a value set becomes empty the associated key must be removed from the dictionary
- Parameters
-
- Returns
- the number of elements removed from this dictionary
- Exceptions
-
ArgumentNullException | if value is nulll |
override string MyCollections.MultiValueDictionary< TKey, TValue >.ToString |
( |
| ) |
|
Returns a string representation of this MultiValueDictionary
- Returns
- a string representation of this MultiValueDictionary
bool MyCollections.MultiValueDictionary< TKey, TValue >.TryGetValue |
( |
TKey |
key, |
|
|
out ISet< TValue > |
values |
|
) |
| |
Try to get the values associated with the specified key
- Parameters
-
key | the key |
values | When this method returns, the value associated with the specified key, if the key is found; otherwise, the default value for the type of the value parameter. This parameter is passed uninitialized. |
- Returns
- true if this dictionary contains an element with the specified key; otherwise, false.
int MyCollections.MultiValueDictionary< TKey, TValue >.Count |
|
get |
The number of keys in this MultiValueDictionary
ICollection<TKey> MyCollections.MultiValueDictionary< TKey, TValue >.Keys |
|
get |
Read-only property. Gets all the keys from this dictionary
ICollection<ISet<TValue> > MyCollections.MultiValueDictionary< TKey, TValue >.Values |
|
get |
Read-only property. Get all the values of this dictionary.
The documentation for this class was generated from the following file: