Craig's Utility Library
4.0 Beta
|
Cache base class More...
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... | |
Cache base class
Definition at line 31 of file CacheBase.cs.
|
protected |
Constructor
Definition at line 36 of file CacheBase.cs.
|
pure virtual |
Add item to the cache
key | Key of the item |
value | Value to add |
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.Add | ( | KeyValuePair< string, object > | item | ) |
void Utilities.DataTypes.Caching.BaseClasses.CacheBase.Add | ( | string | Key, |
object | Value, | ||
IEnumerable< string > | Tags | ||
) |
Adds a value/key combination and assigns tags to it
Key | Key to add |
Tags | Tags to associate with the key/value pair |
Value | Value to add |
Implements Utilities.DataTypes.Caching.Interfaces.ICache.
Definition at line 117 of file CacheBase.cs.
|
pure virtual |
|
pure virtual |
Determines if the item is in the cache
item | item to check for |
Implemented in Utilities.DataTypes.Caching.Default.CacheCache, Utilities.DataTypes.Caching.Default.ItemCache, Utilities.DataTypes.Caching.Default.SessionCache, and Utilities.DataTypes.Caching.Default.Cache.
|
pure virtual |
Checks if the cache contains the key
key | Key to check |
Implemented in Utilities.DataTypes.Caching.Default.CacheCache, Utilities.DataTypes.Caching.Default.ItemCache, Utilities.DataTypes.Caching.Default.SessionCache, and Utilities.DataTypes.Caching.Default.Cache.
|
pure virtual |
Copies to an array
array | Array to copy to |
arrayIndex | Index to start at |
Implemented in Utilities.DataTypes.Caching.Default.CacheCache, Utilities.DataTypes.Caching.Default.ItemCache, Utilities.DataTypes.Caching.Default.SessionCache, and Utilities.DataTypes.Caching.Default.Cache.
IEnumerable<object> Utilities.DataTypes.Caching.BaseClasses.CacheBase.GetByTag | ( | string | Tag | ) |
Gets the objects associated with a specific tag
Tag | Tag to use |
Implements Utilities.DataTypes.Caching.Interfaces.ICache.
Definition at line 154 of file CacheBase.cs.
|
pure virtual |
Gets the enumerator
Implemented in Utilities.DataTypes.Caching.Default.CacheCache, Utilities.DataTypes.Caching.Default.ItemCache, Utilities.DataTypes.Caching.Default.SessionCache, and Utilities.DataTypes.Caching.Default.Cache.
|
pure virtual |
Removes an item from the cache
key | key to remove |
Implemented in Utilities.DataTypes.Caching.Default.CacheCache, Utilities.DataTypes.Caching.Default.ItemCache, Utilities.DataTypes.Caching.Default.SessionCache, and Utilities.DataTypes.Caching.Default.Cache.
|
pure virtual |
Removes an item from an array
item | Item to remove |
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
Tag | Tag to remove |
Implements Utilities.DataTypes.Caching.Interfaces.ICache.
Definition at line 191 of file CacheBase.cs.
|
pure virtual |
Attempt to get a value
key | Key to get |
value | Value of the item |
Implemented in Utilities.DataTypes.Caching.Default.CacheCache, Utilities.DataTypes.Caching.Default.ItemCache, Utilities.DataTypes.Caching.Default.SessionCache, and Utilities.DataTypes.Caching.Default.Cache.
|
get |
The number of items in the cache
Definition at line 44 of file CacheBase.cs.
|
get |
Read only
Definition at line 49 of file CacheBase.cs.
|
get |
Keys
Definition at line 54 of file CacheBase.cs.
|
get |
Name
Definition at line 59 of file CacheBase.cs.
|
getprotected |
Tag mappings
Definition at line 74 of file CacheBase.cs.
|
get |
The tags used thus far
Definition at line 64 of file CacheBase.cs.
|
getset |
|
get |
Values
Definition at line 69 of file CacheBase.cs.