IFileChangeNotificationSystem.StopMonitoring(String, Object) 方法

定义

结束更改监视。Ends change monitoring.

public:
 void StopMonitoring(System::String ^ filePath, System::Object ^ state);
public void StopMonitoring (string filePath, object state);
abstract member StopMonitoring : string * obj -> unit
Public Sub StopMonitoring (filePath As String, state As Object)

参数

filePath
String

要停止监视的文件或文件夹的路径。The path of the file or folder to stop monitoring. 此路径应与之前在对 StartMonitoring(String, OnChangedCallback, Object, DateTimeOffset, Int64) 方法的调用中传递的文件路径值相匹配。This should match a file path value that was passed in an earlier call to the StartMonitoring(String, OnChangedCallback, Object, DateTimeOffset, Int64) method.

state
Object

在之前调用 StartMonitoring(String, OnChangedCallback, Object, DateTimeOffset, Int64) 方法期间,最初由主机环境提供的状态信息。The state information that was originally supplied by the host environment during an earlier call to the StartMonitoring(String, OnChangedCallback, Object, DateTimeOffset, Int64) method.

注解

StopMonitoring 方法必须由主机环境正在释放的自定义缓存和自定义更改监视器调用,以便停止监视文件路径和目录。The StopMonitoring method must be called by custom caches and custom change monitors that are being disposed by the host environment in order to stop monitoring file paths and directories.

适用于