public ChoFileSourceChangeWatcher(string filePath, string[] otherFileList) { ChoGuard.ArgumentNotNullOrEmpty(filePath, "filePath"); _filePath = filePath; _configurationChangeWatcher = new ChoConfigurationChangeCompositeFileWatcher(_filePath, _filePath, otherFileList); _configurationChangeWatcher.SetConfigurationChangedEventHandler(filePath, OnConfigurationChanged); }
private void RefreshDocument() { if (IsXmlFile) { _includeXmlFilePathNodesMap = ExpandIncludes(_xmlDocument, _filePath, _xmlnsManager); } else { _includeXmlFilePathNodesMap = ExpandIncludes(_xmlDocument, null, _xmlnsManager); } foreach (string includeFile in IncludeFiles) { _lastWriteTimeCache.SetValue(includeFile, File.GetLastWriteTime(includeFile)); } if (_watchChange) { _configurationChangeWatcher = new ChoConfigurationChangeCompositeFileWatcher("ChoXmlDocument", _filePath, IncludeFiles); _configurationChangeWatcher.SetConfigurationChangedEventHandler(this, OnFileChanged); } }