internal static void Add(string path, int priority = 0) { if (string.IsNullOrEmpty(path)) { return; } path = Path.GetFullPath(path); if (Path.HasExtension(path)) { return; } SearchDirectoryInfo searchDirectory = SearchDirectoryList.FirstOrDefault(x => x.Path.Equals(path)); if (searchDirectory != null) { return; } searchDirectory = new SearchDirectoryInfo(); searchDirectory.Path = path; searchDirectory.Priority = priority; SearchDirectoryList.Add(searchDirectory); Sort(); }
internal static void Remove(string path) { if (string.IsNullOrEmpty(path)) { return; } path = Path.GetFullPath(path); if (Path.HasExtension(path)) { return; } SearchDirectoryInfo searchDirectory = SearchDirectoryList.FirstOrDefault(x => x.Path.Equals(path)); if (searchDirectory == null) { return; } SearchDirectoryList.Remove(searchDirectory); Sort(); }