public SettingsGroupsCollection(IEnumerable <Type> taskSettings) { foreach (var taskType in taskSettings) { var groups = SettingsIni.GetSections(taskType.Name); groups.ForEach(x => _list.Add(SettingsIni.GetGroupName(x))); } _list = _list.Distinct().ToList(); }
public SettingsRepresentCollection(Type settingRepresentType) { SettingsRepresentTypeName = settingRepresentType.Name; SettingsIni.GetSections(SettingsRepresentTypeName).ForEach(t => _list.Add(Activator.CreateInstance(settingRepresentType, t))); }