Class CachedRepositoryBase<T>
Summary description for CachedRepositoryBase.
Inheritance
System.Object
CachedRepositoryBase<T>
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: ImageVault.Core.DataAccess.Repositories
Assembly: ImageVault.Core.dll
Syntax
public abstract class CachedRepositoryBase<T> : ICachedRepository, IDisposable where T : IRepository
Type Parameters
Name | Description |
---|---|
T |
Constructors
CachedRepositoryBase(T)
Initializes a new instance of the CachedRepositoryBase class.
Declaration
protected CachedRepositoryBase(T repository)
Parameters
Type | Name | Description |
---|---|---|
T | repository |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | If |
Fields
Repository
Gets the Repository of the CachedRepositoryBase<T>
Declaration
protected readonly T Repository
Field Value
Type | Description |
---|---|
T |
Properties
Cache
Gets the Cache of the CachedRepositoryBase
Declaration
protected CoreCacheHelper Cache { get; }
Property Value
Type | Description |
---|---|
CoreCacheHelper |
Methods
CacheChanged(Object, CacheEventType, Object)
Override this to be informed when cache changes has occurred
Declaration
protected virtual void CacheChanged(object sender, CacheEventType type, object args)
Parameters
Type | Name | Description |
---|---|---|
System.Object | sender | The sender of the change event |
CacheEventType | type | The cache CacheEventType |
System.Object | args | The argument for the change |
ClearCache()
Clears the cache of the repository
Declaration
public virtual void ClearCache()
Dispose()
Releases the resources used by the CachedRepositoryBase<T>.
Declaration
public void Dispose()
Remarks
Do not mark this as virtual since this will fail unit tests
NotifyCacheChange(CacheEventType, Object)
Notify that the cache has been changed
Declaration
protected void NotifyCacheChange(CacheEventType type, object arg = null)
Parameters
Type | Name | Description |
---|---|---|
CacheEventType | type | The type of cache event to trigger |
System.Object | arg |
Implements
System.IDisposable