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 。 建構函式至少會驗證傳入其中的路徑集合,然後初始化這些路徑的監視。

注意

建構函式只會執行路徑名稱的字串驗證。 它無法規范路徑或驗證路徑是否存在。

適用於