An IRDList which additionally indexes its content and provides a method to retrieve content through the index.
More...
|
bool | ContainsKey (TK key) |
| Check wether the index contains a specific key. If you want to get an element, if it is available, use TryGet as it is faster than a call to ContainsKey and a Get afterwards.
|
|
T | Get (TK key) |
| Get an entry with a specific key value. Throws an exception if entry could not be found.
|
|
new IIndexedCachedList< TK, T > | Refreshed () |
|
bool | TryGet (TK name, out T obj) |
| Try to get an entry with a specific key value, returns false, if entry could not be found.
|
|
void | WaitFor (Predicate< IIndexedCachedList< TK, T >> predicate, TimeSpan maxWait, TimeSpan retryPeriod) |
|
T | GetByPosition (int pos) |
| Get an element of the list at a specific position.
|
|
ICachedList< T > | Refreshed () |
| Calls Refresh() and returns this.
|
|
void | WaitFor (Predicate< ICachedList< T >> predicate, TimeSpan wait, TimeSpan retryPeriod) |
| Waits until a predicate on itself becomes true. Every retry period Refresh() is called and the predicate evaluated again, until the predicate evaluates to true, or the wait timespan is exhausted.
|
|
void | InvalidateCache () |
| Clear the cache and refresh it on the next access.
|
|
void | Refresh () |
| Updates the cache immediatly.
|
|
An IRDList which additionally indexes its content and provides a method to retrieve content through the index.
- Template Parameters
-
T | (Super)type of stored elements |
TK | TypeId of the index keys |
Definition at line 26 of file IIndexedCachedList.cs.
bool erminas.SmartAPI.Utils.CachedCollections.IIndexedCachedList< in TK, T >.ContainsKey |
( |
TK |
key | ) |
|
Check wether the index contains a specific key. If you want to get an element, if it is available, use TryGet as it is faster than a call to ContainsKey and a Get afterwards.
- Returns
- true, if an entry with the specified key is available, false otherwise
T erminas.SmartAPI.Utils.CachedCollections.IIndexedCachedList< in TK, T >.Get |
( |
TK |
key | ) |
|
Get an entry with a specific key value. Throws an exception if entry could not be found.
- Parameters
-
key | Key of the entry to get |
- Exceptions
-
KeyNotFoundException | Thrown if collection is empty or no element with key could be found |
ArgumentNullException | Thrown if key == null |
new IIndexedCachedList<TK, T> erminas.SmartAPI.Utils.CachedCollections.IIndexedCachedList< in TK, T >.Refreshed |
( |
| ) |
|
bool erminas.SmartAPI.Utils.CachedCollections.IIndexedCachedList< in TK, T >.TryGet |
( |
TK |
name, |
|
|
out T |
obj |
|
) |
| |
Try to get an entry with a specific key value, returns false, if entry could not be found.
- Parameters
-
name | Name of the entry to get |
obj | Output parameter containing the entry on success |
- Returns
- true, if entry could be found, false otherwise.
void erminas.SmartAPI.Utils.CachedCollections.IIndexedCachedList< in TK, T >.WaitFor |
( |
Predicate< IIndexedCachedList< TK, T >> |
predicate, |
|
|
TimeSpan |
maxWait, |
|
|
TimeSpan |
retryPeriod |
|
) |
| |
T erminas.SmartAPI.Utils.CachedCollections.IIndexedCachedList< in TK, T >.this[TK key] |
|
get |
The documentation for this interface was generated from the following file: