public static void AddDataFolder(DataFolder dataFolder) { if (dataFolder == null) return; if (!_dataFolderList.Contains(dataFolder)) _dataFolderList.Add(dataFolder); }
/// <summary> /// Constructor. /// </summary> static DataFolders() { var customSection = ConfigurationManager.GetSection(CustomConfigurationSection.SectionName) as CustomConfigurationSection; if (customSection != null) { foreach (DataFolderElement dataFolderElement in customSection.DataFolders) { var dataFolder = new DataFolder() { Name = dataFolderElement.Name, Path = dataFolderElement.Path }; AddDataFolder(dataFolder); } } }