public void AddDependencyPath(string filePath) { if (!ContainsKey(filePath)) { Add(filePath, NativeFile.GetLastWriteTime(filePath)); } }
/// <summary> /// Checks for changes in the dependency file. /// </summary> /// <returns><c>true</c> if a file has been updated, <c>false</c> otherwise</returns> public bool CheckForChanges() { // No files? Then it is considered as changed. if (Count == 0) { return(true); } foreach (var fileItem in this) { if (!File.Exists(fileItem.Key)) { return(true); } var fileTime = NativeFile.GetLastWriteTime(fileItem.Key); if (fileItem.Value != fileTime) { return(true); } } return(false); }