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 的類別。

方法

名稱 Description
StartMonitoring(String, OnChangedCallback, Object, DateTimeOffset, Int64)

註冊一個檔案路徑以便與主機環境監控。

StopMonitoring(String, Object)

端部改變監控。

適用於