Craig's Utility Library  4.0 Beta
Utilities.DataTypes.Caching.BaseClasses.CacheBase Class Referenceabstract

Cache base class More...

Inheritance diagram for Utilities.DataTypes.Caching.BaseClasses.CacheBase:
Utilities.DataTypes.Patterns.BaseClasses.SafeDisposableBaseClass Utilities.DataTypes.Caching.Interfaces.ICache Utilities.DataTypes.Caching.Default.Cache Utilities.DataTypes.Caching.Default.CacheCache Utilities.DataTypes.Caching.Default.ItemCache Utilities.DataTypes.Caching.Default.SessionCache

Public Member Functions

abstract void Add (string key, object value)
 Add item to the cache More...
 
void Add (KeyValuePair< string, object > item)
 Adds an item to the cache More...
 
void Add (string Key, object Value, IEnumerable< string > Tags)
 Adds a value/key combination and assigns tags to it More...
 
abstract void Clear ()
 Clears the cache More...
 
abstract bool Contains (KeyValuePair< string, object > item)
 Determines if the item is in the cache More...
 
abstract bool ContainsKey (string key)
 Checks if the cache contains the key More...
 
abstract void CopyTo (KeyValuePair< string, object >[] array, int arrayIndex)
 Copies to an array More...
 
IEnumerable< object > GetByTag (string Tag)
 Gets the objects associated with a specific tag More...
 
abstract IEnumerator< KeyValuePair< string, object > > GetEnumerator ()
 Gets the enumerator More...
 
abstract bool Remove (string key)
 Removes an item from the cache More...
 
abstract bool Remove (KeyValuePair< string, object > item)
 Removes an item from an array More...
 
void RemoveByTag (string Tag)
 Removes all items associated with the tag specified More...
 
abstract bool TryGetValue (string key, out object value)
 Attempt to get a value More...
 
- Public Member Functions inherited from Utilities.DataTypes.Patterns.BaseClasses.SafeDisposableBaseClass
void Dispose ()
 Dispose function More...
 

Protected Member Functions

 CacheBase ()
 Constructor More...
 
- Protected Member Functions inherited from Utilities.DataTypes.Patterns.BaseClasses.SafeDisposableBaseClass
 SafeDisposableBaseClass ()
 Construct More...
 
abstract void Dispose (bool Managed)
 Function to override in order to dispose objects More...
 

Properties

abstract int Count [get]
 The number of items in the cache More...
 
bool IsReadOnly [get]
 Read only More...
 
abstract ICollection< string > Keys [get]
 Keys More...
 
abstract string Name [get]
 Name More...
 
IEnumerable< string > Tags [get]
 The tags used thus far More...
 
abstract ICollection< object > Values [get]
 Values More...
 
ListMapping< string, string > TagMappings [get]
 Tag mappings More...
 
object this[string key] [get, set]
 Indexer More...
 
- Properties inherited from Utilities.DataTypes.Caching.Interfaces.ICache
string Name [get]
 Cache name More...
 
IEnumerable< string > Tags [get]
 The tags used thus far More...
 

Detailed Description

Cache base class

Definition at line 31 of file CacheBase.cs.

Constructor & Destructor Documentation

Utilities.DataTypes.Caching.BaseClasses.CacheBase.CacheBase ( )
protected

Constructor

Definition at line 36 of file CacheBase.cs.

Member Function Documentation

abstract void Utilities.DataTypes.Caching.BaseClasses.CacheBase.Add ( string  key,
object  value 
)
pure virtual
void Utilities.DataTypes.Caching.BaseClasses.CacheBase.Add ( KeyValuePair< string, object >  item)

Adds an item to the cache

Parameters
itemitem to add

Definition at line 106 of file CacheBase.cs.

void Utilities.DataTypes.Caching.BaseClasses.CacheBase.Add ( string  Key,
object  Value,
IEnumerable< string >  Tags 
)

Adds a value/key combination and assigns tags to it

Parameters
KeyKey to add
TagsTags to associate with the key/value pair
ValueValue to add

Implements Utilities.DataTypes.Caching.Interfaces.ICache.

Definition at line 117 of file CacheBase.cs.

abstract void Utilities.DataTypes.Caching.BaseClasses.CacheBase.Clear ( )
pure virtual
abstract bool Utilities.DataTypes.Caching.BaseClasses.CacheBase.Contains ( KeyValuePair< string, object >  item)
pure virtual
abstract bool Utilities.DataTypes.Caching.BaseClasses.CacheBase.ContainsKey ( string  key)
pure virtual

Checks if the cache contains the key

Parameters
keyKey to check
Returns
True if it is there, false otherwise

Implemented in Utilities.DataTypes.Caching.Default.CacheCache, Utilities.DataTypes.Caching.Default.ItemCache, Utilities.DataTypes.Caching.Default.SessionCache, and Utilities.DataTypes.Caching.Default.Cache.

abstract void Utilities.DataTypes.Caching.BaseClasses.CacheBase.CopyTo ( KeyValuePair< string, object >[]  array,
int  arrayIndex 
)
pure virtual
IEnumerable<object> Utilities.DataTypes.Caching.BaseClasses.CacheBase.GetByTag ( string  Tag)

Gets the objects associated with a specific tag

Parameters
TagTag to use
Returns
The objects associated with the tag

Implements Utilities.DataTypes.Caching.Interfaces.ICache.

Definition at line 154 of file CacheBase.cs.

abstract IEnumerator<KeyValuePair<string, object> > Utilities.DataTypes.Caching.BaseClasses.CacheBase.GetEnumerator ( )
pure virtual
abstract bool Utilities.DataTypes.Caching.BaseClasses.CacheBase.Remove ( string  key)
pure virtual

Removes an item from the cache

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

Implemented in Utilities.DataTypes.Caching.Default.CacheCache, Utilities.DataTypes.Caching.Default.ItemCache, Utilities.DataTypes.Caching.Default.SessionCache, and Utilities.DataTypes.Caching.Default.Cache.

abstract bool Utilities.DataTypes.Caching.BaseClasses.CacheBase.Remove ( KeyValuePair< string, object >  item)
pure virtual

Removes an item from an array

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

Implemented in Utilities.DataTypes.Caching.Default.CacheCache, Utilities.DataTypes.Caching.Default.ItemCache, Utilities.DataTypes.Caching.Default.SessionCache, and Utilities.DataTypes.Caching.Default.Cache.

void Utilities.DataTypes.Caching.BaseClasses.CacheBase.RemoveByTag ( string  Tag)

Removes all items associated with the tag specified

Parameters
TagTag to remove

Implements Utilities.DataTypes.Caching.Interfaces.ICache.

Definition at line 191 of file CacheBase.cs.

abstract bool Utilities.DataTypes.Caching.BaseClasses.CacheBase.TryGetValue ( string  key,
out object  value 
)
pure virtual

Attempt to get a value

Parameters
keyKey to get
valueValue of the item
Returns
True if it is found, false otherwise

Implemented in Utilities.DataTypes.Caching.Default.CacheCache, Utilities.DataTypes.Caching.Default.ItemCache, Utilities.DataTypes.Caching.Default.SessionCache, and Utilities.DataTypes.Caching.Default.Cache.

Property Documentation

abstract int Utilities.DataTypes.Caching.BaseClasses.CacheBase.Count
get

The number of items in the cache

Definition at line 44 of file CacheBase.cs.

bool Utilities.DataTypes.Caching.BaseClasses.CacheBase.IsReadOnly
get

Read only

Definition at line 49 of file CacheBase.cs.

abstract ICollection<string> Utilities.DataTypes.Caching.BaseClasses.CacheBase.Keys
get

Keys

Definition at line 54 of file CacheBase.cs.

abstract string Utilities.DataTypes.Caching.BaseClasses.CacheBase.Name
get

Name

Definition at line 59 of file CacheBase.cs.

ListMapping<string, string> Utilities.DataTypes.Caching.BaseClasses.CacheBase.TagMappings
getprotected

Tag mappings

Definition at line 74 of file CacheBase.cs.

IEnumerable<string> Utilities.DataTypes.Caching.BaseClasses.CacheBase.Tags
get

The tags used thus far

Definition at line 64 of file CacheBase.cs.

object Utilities.DataTypes.Caching.BaseClasses.CacheBase.this[string key]
getset

Indexer

Parameters
keyKey
Returns
The object specified

Definition at line 82 of file CacheBase.cs.

abstract ICollection<object> Utilities.DataTypes.Caching.BaseClasses.CacheBase.Values
get

Values

Definition at line 69 of file CacheBase.cs.


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