Share via


HostFileChangeMonitor(IList<String>) 构造函数

定义

初始化 HostFileChangeMonitor 类的新实例。

public:
 HostFileChangeMonitor(System::Collections::Generic::IList<System::String ^> ^ filePaths);
public HostFileChangeMonitor (System.Collections.Generic.IList<string> filePaths);
new System.Runtime.Caching.HostFileChangeMonitor : System.Collections.Generic.IList<string> -> System.Runtime.Caching.HostFileChangeMonitor
Public Sub New (filePaths As IList(Of String))

参数

filePaths
IList<String>

包含要监视的一个或多个目录路径或文件路径的列表。

例外

filePathsnull

filePaths 包含零项。

- 或 -

filePaths 列表中的路径为 null 或空字符串。

注解

对构造函数的 HostFileChangeMonitor 调用必须为 参数提供非 null 值 filePaths 。 构造函数至少验证传入其中的路径集合,然后初始化对这些路径的监视。

注意

构造函数仅对路径名称执行字符串验证。 它不会规范路径或验证路径是否存在。

适用于