Craig's Utility Library  4.0 Beta
Utilities.DataTypes.ListMapping< T1, T2 > Class Template Reference

Maps a key to a list of data More...

Inheritance diagram for Utilities.DataTypes.ListMapping< T1, T2 >:

Public Member Functions

 ListMapping ()
 Constructor More...
 
virtual void Add (T1 Key, T2 Value)
 Adds an item to the mapping More...
 
virtual void Add (KeyValuePair< T1, IEnumerable< T2 >> item)
 Adds a key value pair More...
 
virtual void Add (T1 Key, IEnumerable< T2 > Value)
 Adds a list of items to the mapping More...
 
virtual void Clear ()
 Clears all items from the listing More...
 
virtual bool Contains (KeyValuePair< T1, IEnumerable< T2 >> item)
 Does this contain the key value pairs? More...
 
virtual bool Contains (T1 Key, IEnumerable< T2 > Values)
 Does the list mapping contain the key value pairs? More...
 
bool Contains (T1 Key, T2 Value)
 Does the list mapping contain the key value pair? More...
 
virtual bool ContainsKey (T1 key)
 Determines if a key exists More...
 
void CopyTo (KeyValuePair< T1, IEnumerable< T2 >>[] array, int arrayIndex)
 Not implemented More...
 
IEnumerator< KeyValuePair< T1, IEnumerable< T2 > > > GetEnumerator ()
 Gets the enumerator More...
 
virtual bool Remove (T1 key)
 Remove a list of items associated with a key More...
 
virtual bool Remove (KeyValuePair< T1, IEnumerable< T2 >> item)
 Removes a key value pair from the list mapping More...
 
virtual bool Remove (T1 Key, T2 Value)
 Removes a key value pair from the list mapping More...
 
override string ToString ()
 Returns a System.String that represents this instance. More...
 
virtual bool TryGetValue (T1 Key, out IEnumerable< T2 > Value)
 Tries to get the value associated with the key More...
 

Properties

virtual int Count [get]
 The number of items in the listing More...
 
bool IsReadOnly [get]
 Not read only More...
 
virtual ICollection< T1 > Keys [get]
 The list of keys within the mapping More...
 
ICollection< IEnumerable< T2 > > Values [get]
 List that contains the list of values More...
 
ConcurrentDictionary< T1, ConcurrentBag< T2 > > Items [get]
 Container holding the data More...
 
virtual IEnumerable< T2 > this[T1 key] [get, set]
 Gets a list of values associated with a key More...
 

Detailed Description

Maps a key to a list of data

Template Parameters
T1Key value
T2Type that the list should contain

Definition at line 36 of file ListMapping.cs.

Constructor & Destructor Documentation

Constructor

Definition at line 41 of file ListMapping.cs.

Member Function Documentation

virtual void Utilities.DataTypes.ListMapping< T1, T2 >.Add ( T1  Key,
T2  Value 
)
virtual

Adds an item to the mapping

Parameters
KeyKey value
ValueThe value to add

Definition at line 105 of file ListMapping.cs.

virtual void Utilities.DataTypes.ListMapping< T1, T2 >.Add ( KeyValuePair< T1, IEnumerable< T2 >>  item)
virtual

Adds a key value pair

Parameters
itemKey value pair to add

Definition at line 117 of file ListMapping.cs.

virtual void Utilities.DataTypes.ListMapping< T1, T2 >.Add ( T1  Key,
IEnumerable< T2 >  Value 
)
virtual

Adds a list of items to the mapping

Parameters
KeyKey value
ValueThe values to add

Definition at line 127 of file ListMapping.cs.

virtual void Utilities.DataTypes.ListMapping< T1, T2 >.Clear ( )
virtual

Clears all items from the listing

Definition at line 138 of file ListMapping.cs.

virtual bool Utilities.DataTypes.ListMapping< T1, T2 >.Contains ( KeyValuePair< T1, IEnumerable< T2 >>  item)
virtual

Does this contain the key value pairs?

Parameters
itemKey value pair to check
Returns
True if it exists, false otherwise

Definition at line 148 of file ListMapping.cs.

virtual bool Utilities.DataTypes.ListMapping< T1, T2 >.Contains ( T1  Key,
IEnumerable< T2 >  Values 
)
virtual

Does the list mapping contain the key value pairs?

Parameters
KeyKey value
ValuesValue
Returns
True if it exists, false otherwise

Definition at line 163 of file ListMapping.cs.

bool Utilities.DataTypes.ListMapping< T1, T2 >.Contains ( T1  Key,
T2  Value 
)

Does the list mapping contain the key value pair?

Parameters
KeyKey
ValueValue
Returns
True if it exists, false otherwise

Definition at line 179 of file ListMapping.cs.

virtual bool Utilities.DataTypes.ListMapping< T1, T2 >.ContainsKey ( T1  key)
virtual

Determines if a key exists

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

Definition at line 193 of file ListMapping.cs.

void Utilities.DataTypes.ListMapping< T1, T2 >.CopyTo ( KeyValuePair< T1, IEnumerable< T2 >>[]  array,
int  arrayIndex 
)

Not implemented

Parameters
arrayArray to copy to
arrayIndexarray index

Definition at line 203 of file ListMapping.cs.

IEnumerator<KeyValuePair<T1, IEnumerable<T2> > > Utilities.DataTypes.ListMapping< T1, T2 >.GetEnumerator ( )

Gets the enumerator

Returns
The enumerator for this object

Definition at line 212 of file ListMapping.cs.

virtual bool Utilities.DataTypes.ListMapping< T1, T2 >.Remove ( T1  key)
virtual

Remove a list of items associated with a key

Parameters
keyKey to use
Returns
True if the key is found, false otherwise

Definition at line 223 of file ListMapping.cs.

virtual bool Utilities.DataTypes.ListMapping< T1, T2 >.Remove ( KeyValuePair< T1, IEnumerable< T2 >>  item)
virtual

Removes a key value pair from the list mapping

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

Definition at line 234 of file ListMapping.cs.

virtual bool Utilities.DataTypes.ListMapping< T1, T2 >.Remove ( T1  Key,
T2  Value 
)
virtual

Removes a key value pair from the list mapping

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

Definition at line 250 of file ListMapping.cs.

override string Utilities.DataTypes.ListMapping< T1, T2 >.ToString ( )

Returns a System.String that represents this instance.

Returns
A System.String that represents this instance.

Definition at line 280 of file ListMapping.cs.

virtual bool Utilities.DataTypes.ListMapping< T1, T2 >.TryGetValue ( T1  Key,
out IEnumerable< T2 >  Value 
)
virtual

Tries to get the value associated with the key

Parameters
KeyKey value
ValueThe values getting
Returns
True if it was able to get the value, false otherwise

Definition at line 296 of file ListMapping.cs.

Property Documentation

virtual int Utilities.DataTypes.ListMapping< T1, T2 >.Count
get

The number of items in the listing

Definition at line 50 of file ListMapping.cs.

bool Utilities.DataTypes.ListMapping< T1, T2 >.IsReadOnly
get

Not read only

Definition at line 58 of file ListMapping.cs.

ConcurrentDictionary<T1, ConcurrentBag<T2> > Utilities.DataTypes.ListMapping< T1, T2 >.Items
getprotected

Container holding the data

Definition at line 87 of file ListMapping.cs.

virtual ICollection<T1> Utilities.DataTypes.ListMapping< T1, T2 >.Keys
get

The list of keys within the mapping

Definition at line 66 of file ListMapping.cs.

virtual IEnumerable<T2> Utilities.DataTypes.ListMapping< T1, T2 >.this[T1 key]
getset

Gets a list of values associated with a key

Parameters
keyKey to look for
Returns
The list of values

Definition at line 95 of file ListMapping.cs.

ICollection<IEnumerable<T2> > Utilities.DataTypes.ListMapping< T1, T2 >.Values
get

List that contains the list of values

Definition at line 74 of file ListMapping.cs.


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