Craig's Utility Library  4.0 Beta
Utilities.DataTypes.TagDictionary< Key, Value > Class Template Reference

Dictionary that matches multiple keys to each value More...

Inheritance diagram for Utilities.DataTypes.TagDictionary< Key, Value >:

Public Member Functions

 TagDictionary ()
 Constructor More...
 
void Add (Key key, IEnumerable< Value > value)
 Adds a list of values to the key More...
 
void Add (Value Value, params Key[] Keys)
 Adds a value to the dicionary More...
 
void Add (KeyValuePair< Key, IEnumerable< Value >> item)
 Adds an item to the dictionary More...
 
void Clear ()
 Clears the dictionary More...
 
bool Contains (KeyValuePair< Key, IEnumerable< Value >> item)
 Determines if the dictionary contains the key/value pair More...
 
bool ContainsKey (Key key)
 Determines if a key is in the dictionary More...
 
void CopyTo (KeyValuePair< Key, IEnumerable< Value >>[] array, int arrayIndex)
 Copies itself to an array More...
 
IEnumerator< KeyValuePair< Key, IEnumerable< Value > > > GetEnumerator ()
 Gets the enumerator More...
 
bool Remove (Key key)
 Removes all items that are associated with a key More...
 
bool Remove (KeyValuePair< Key, IEnumerable< Value >> item)
 Removes a specific key/value pair More...
 
bool TryGetValue (Key key, out IEnumerable< Value > value)
 Attempts to get the values associated with a key More...
 

Properties

int Count [get]
 Number of items in the dictionary More...
 
bool IsReadOnly [get]
 Always false More...
 
ICollection< Key > Keys [get]
 Gets the keys found in the dictionary More...
 
ICollection< IEnumerable< Value > > Values [get]
 Gets the values found in the dictionary More...
 
IEnumerable< Value > this[Key key] [get, set]
 Gets the values based on a key More...
 

Detailed Description

Dictionary that matches multiple keys to each value

Template Parameters
KeyKey type
ValueValue type

Definition at line 35 of file TagDictionary.cs.

Constructor & Destructor Documentation

Constructor

Definition at line 40 of file TagDictionary.cs.

Member Function Documentation

void Utilities.DataTypes.TagDictionary< Key, Value >.Add ( Key  key,
IEnumerable< Value >  value 
)

Adds a list of values to the key

Parameters
keyKey
valueValues to add

Definition at line 110 of file TagDictionary.cs.

void Utilities.DataTypes.TagDictionary< Key, Value >.Add ( Value  Value,
params Key[]  Keys 
)

Adds a value to the dicionary

Parameters
ValueValue to add
KeysKeys to associate the value with

Definition at line 121 of file TagDictionary.cs.

void Utilities.DataTypes.TagDictionary< Key, Value >.Add ( KeyValuePair< Key, IEnumerable< Value >>  item)

Adds an item to the dictionary

Parameters
itemitem to add

Definition at line 132 of file TagDictionary.cs.

void Utilities.DataTypes.TagDictionary< Key, Value >.Clear ( )

Clears the dictionary

Definition at line 140 of file TagDictionary.cs.

bool Utilities.DataTypes.TagDictionary< Key, Value >.Contains ( KeyValuePair< Key, IEnumerable< Value >>  item)

Determines if the dictionary contains the key/value pair

Parameters
itemitem to check
Returns
True if it is, false otherwise

Definition at line 150 of file TagDictionary.cs.

bool Utilities.DataTypes.TagDictionary< Key, Value >.ContainsKey ( Key  key)

Determines if a key is in the dictionary

Parameters
keyKey to check
Returns
True if it exists, false otherwise

Definition at line 160 of file TagDictionary.cs.

void Utilities.DataTypes.TagDictionary< Key, Value >.CopyTo ( KeyValuePair< Key, IEnumerable< Value >>[]  array,
int  arrayIndex 
)

Copies itself to an array

Parameters
arrayArray
arrayIndexArray index

Definition at line 170 of file TagDictionary.cs.

IEnumerator<KeyValuePair<Key, IEnumerable<Value> > > Utilities.DataTypes.TagDictionary< Key, Value >.GetEnumerator ( )

Gets the enumerator

Returns
The enumerator

Definition at line 182 of file TagDictionary.cs.

bool Utilities.DataTypes.TagDictionary< Key, Value >.Remove ( Key  key)

Removes all items that are associated with a key

Parameters
keyKey
Returns
Returns true if the key was found, false otherwise

Definition at line 195 of file TagDictionary.cs.

bool Utilities.DataTypes.TagDictionary< Key, Value >.Remove ( KeyValuePair< Key, IEnumerable< Value >>  item)

Removes a specific key/value pair

Parameters
itemitem to remove
Returns
True if it is removed, false otherwise

Definition at line 208 of file TagDictionary.cs.

bool Utilities.DataTypes.TagDictionary< Key, Value >.TryGetValue ( Key  key,
out IEnumerable< Value >  value 
)

Attempts to get the values associated with a key

Parameters
keyKey
valueValues associated with a key
Returns
True if something is returned, false otherwise

Definition at line 231 of file TagDictionary.cs.

Property Documentation

int Utilities.DataTypes.TagDictionary< Key, Value >.Count
get

Number of items in the dictionary

Definition at line 50 of file TagDictionary.cs.

bool Utilities.DataTypes.TagDictionary< Key, Value >.IsReadOnly
get

Always false

Definition at line 58 of file TagDictionary.cs.

ICollection<Key> Utilities.DataTypes.TagDictionary< Key, Value >.Keys
get

Gets the keys found in the dictionary

Definition at line 66 of file TagDictionary.cs.

IEnumerable<Value> Utilities.DataTypes.TagDictionary< Key, Value >.this[Key key]
getset

Gets the values based on a key

Parameters
keyKey to get the values of
Returns
The values associated with the key

Definition at line 94 of file TagDictionary.cs.

ICollection<IEnumerable<Value> > Utilities.DataTypes.TagDictionary< Key, Value >.Values
get

Gets the values found in the dictionary

Definition at line 74 of file TagDictionary.cs.


The documentation for this class was generated from the following file: