//
// System.Web.Caching
//
// Author:
// Patrik Torstensson (Patrik.Torstensson@labs2.com)
//
// (C) Copyright Patrik Torstensson, 2001
//
namespace System.Web.Caching
{
///
/// Class to handle cache dependency, right now this class is only a mookup
///
public sealed class CacheDependency : System.IDisposable
{
private bool _boolDisposed;
public CacheDependency()
{
_boolDisposed = false;
}
///
/// Added by gvaish@iitk.ac.in
///
[MonoTODO("Constructor")]
public CacheDependency(string filename)
{
}
///
/// Added by gvaish@iitk.ac.in
///
[MonoTODO("Constructor")]
public CacheDependency(string[] filenames, string[] cachekeys)
{
}
public delegate void CacheDependencyCallback(CacheDependency objDependency);
public event CacheDependencyCallback Changed;
public void OnChanged()
{
if (_boolDisposed)
{
throw new System.ObjectDisposedException("System.Web.CacheDependency");
}
if (Changed != null)
{
Changed(this);
}
}
public bool IsDisposed
{
get
{
return _boolDisposed;
}
}
public bool HasEvents
{
get
{
if (_boolDisposed)
{
throw new System.ObjectDisposedException("System.Web.CacheDependency");
}
if (Changed != null)
{
return true;
}
return false;
}
}
public void Dispose()
{
_boolDisposed = true;
}
///
/// Used in testing.
///
public void Signal()
{
OnChanged();
}
}
}