SmartAPI
Open Source .NET RQL library for RedDot CMS / OpenText WSM Management Server
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Properties Pages
erminas.SmartAPI.Utils.CachedCollections.CachedList< T > Class Template Reference
+ Inheritance diagram for erminas.SmartAPI.Utils.CachedCollections.CachedList< T >:
+ Collaboration diagram for erminas.SmartAPI.Utils.CachedCollections.CachedList< T >:

Public Member Functions

 CachedList (Func< List< T >> retrieveFunc, Caching caching)
 
GetByPosition (int pos)
 
IEnumerator< T > GetEnumerator ()
 
virtual void InvalidateCache ()
 
void Refresh ()
 
ICachedList< T > Refreshed ()
 
void WaitFor (Predicate< ICachedList< T >> predicate, TimeSpan wait, TimeSpan retryPeriod)
 
- Public Member Functions inherited from erminas.SmartAPI.Utils.CachedCollections.ICachedList< out 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.
 
- Public Member Functions inherited from erminas.SmartAPI.Utils.CachedCollections.ICached
void InvalidateCache ()
 Clear the cache and refresh it on the next access.
 
void Refresh ()
 Updates the cache immediatly.
 

Protected Member Functions

 CachedList (Caching caching)
 
void EnsureListIsLoaded ()
 

Properties

int Count [get]
 
virtual bool IsCachingEnabled [get, set]
 
virtual List< T > List [get, set]
 
Func< List< T > > RetrieveFunc [get, set]
 
- Properties inherited from erminas.SmartAPI.Utils.CachedCollections.ICachedList< out T >
int Count [get]
 
bool IsCachingEnabled [get, set]
 True == caching is enabled False == caching is disabled
 

Detailed Description

Type Constraints
T :class 

Definition at line 22 of file CachedList.cs.

Constructor & Destructor Documentation

erminas.SmartAPI.Utils.CachedCollections.CachedList< T >.CachedList ( Func< List< T >>  retrieveFunc,
Caching  caching 
)

Definition at line 26 of file CachedList.cs.

erminas.SmartAPI.Utils.CachedCollections.CachedList< T >.CachedList ( Caching  caching)
protected

Definition at line 32 of file CachedList.cs.

Member Function Documentation

void erminas.SmartAPI.Utils.CachedCollections.CachedList< T >.EnsureListIsLoaded ( )
protected

Definition at line 89 of file CachedList.cs.

T erminas.SmartAPI.Utils.CachedCollections.CachedList< T >.GetByPosition ( int  pos)

Definition at line 46 of file CachedList.cs.

IEnumerator<T> erminas.SmartAPI.Utils.CachedCollections.CachedList< T >.GetEnumerator ( )

Definition at line 52 of file CachedList.cs.

virtual void erminas.SmartAPI.Utils.CachedCollections.CachedList< T >.InvalidateCache ( )
virtual

Definition at line 58 of file CachedList.cs.

void erminas.SmartAPI.Utils.CachedCollections.CachedList< T >.Refresh ( )

Definition at line 69 of file CachedList.cs.

ICachedList<T> erminas.SmartAPI.Utils.CachedCollections.CachedList< T >.Refreshed ( )

Definition at line 78 of file CachedList.cs.

void erminas.SmartAPI.Utils.CachedCollections.CachedList< T >.WaitFor ( Predicate< ICachedList< T >>  predicate,
TimeSpan  wait,
TimeSpan  retryPeriod 
)

Definition at line 84 of file CachedList.cs.

Property Documentation

int erminas.SmartAPI.Utils.CachedCollections.CachedList< T >.Count
get

Definition at line 38 of file CachedList.cs.

virtual bool erminas.SmartAPI.Utils.CachedCollections.CachedList< T >.IsCachingEnabled
getset

Definition at line 64 of file CachedList.cs.

virtual List<T> erminas.SmartAPI.Utils.CachedCollections.CachedList< T >.List
getsetprotected

Definition at line 99 of file CachedList.cs.

Func<List<T> > erminas.SmartAPI.Utils.CachedCollections.CachedList< T >.RetrieveFunc
getsetprotected

Definition at line 100 of file CachedList.cs.


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