Type parameters:
| TKey | Key type. |
| T | List type. |
Constructors
KeyedLists
#Create a new instance of this class with a custom comparer.
Parameters:
| comparer (IEqualityComparer<TKey>) |
Properties
Indexers
this[]
#Gets the list associated with the given key.
Parameters:
| key (TKey) | Key of list to access. |
Returns: List at given key.
Methods
Add
#public void Add(TKey key, T item)
Add an item to the correct list.
Parameters:
| key (TKey) | Associated key. |
| item (T) | Item to add. |
AddRange
#Add an item to the correct list.
Parameters:
| key (TKey) | Associated key. |
| items (IEnumerable<T>) | Items to add. |
ContainsItem
#Gets whether a given key + index is defined within this structure.
Parameters:
| key (TKey) | Key to test for. |
| index (int) | Index to test for. |
Returns: True if key and index exists.
ContainsKey
#Gets whether a given key is defined within this structure.
Parameters:
| key (TKey) | Key to test for. |
Returns: True if key exists.
IndexOf
#Finds the first occurance of a specific value.
Parameters:
| value (T) | Value to search for. |
| key (out TKey) | Key at which value is found. |
| index (out int) | Index at which value is found. |
Returns: True on success, false on failure.
Indices
#Iterates over all items which match a given predicate.
Parameters:
| match (Predicate<T>) | Matching delegate. |
Indices
#Iterates over all items which are equal to the given value.
Parameters:
| value (T) | Value to search for. |
Insert
#Add an item to the correct list.
Parameters:
| key (TKey) | Associated key. |
| index (int) | Index for insertion. |
| item (T) | Item to add. |
InsertRange
#Add an item to the correct list.
Parameters:
| key (TKey) | Associated key. |
| index (int) | Index for insertion. |
| items (IEnumerable<T>) | Items to add. |
Reassign
#public void Reassign(TKey oldKey, TKey newKey)
Reassign a key. If the new key is already part of the palette, the lists will be merged.
Parameters:
| oldKey (TKey) | Key to replace. |
| newKey (TKey) | Key to replace with. |
Remove
#public void Remove(TKey key)
Remove a key and list pair from this collection.
Parameters:
| key (TKey) | Key to remove. |
RemoveAt
#Remove an item from the correct list.
Parameters:
| key (TKey) | Associated key. |
| index (int) | Index for removal. |
RemoveRange
#Remove items from the correct list.