IFileChangeNotificationSystem 接口

定义

定义向缓存实现公开自定义 FileChangeMonitor 对象的方式。

public interface class IFileChangeNotificationSystem
public interface IFileChangeNotificationSystem
type IFileChangeNotificationSystem = interface
Public Interface IFileChangeNotificationSystem

注解

在 ASP.NET 中, IFileChangeNotificationSystem 接口提供对内部文件更改通知管理的访问权限。

IFileChangeNotificationSystem接口由 HostFileChangeMonitor 类在内部使用。

当缓存实现在 ASP.NET 应用程序域中运行时,ASP.NET 通过 Host 属性实现IFileChangeNotificationSystem接口。 类 HostFileChangeMonitor 检测此属性,并使用 ASP.NET 文件更改通知系统根据文件更改通知逐出缓存条目。

在 non-ASP.NET 应用程序中,没有实现自定义 IFileChangeNotificationSystem 接口的主机环境。 因此, HostFileChangeMonitor 类使用 FileSystemWatcher CLR 的 类。

方法

StartMonitoring(String, OnChangedCallback, Object, DateTimeOffset, Int64)

向主机环境注册一个要监视的文件路径。

StopMonitoring(String, Object)

结束更改监视。

适用于