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 包含零项。

-或-

列表中的路径 filePathsnull 空字符串。

注解

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

注释

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

适用于