public section_collection(section_collection ori, IEqualityComparer <string> searchComparer) { _searchComparer = searchComparer ?? EqualityComparer <string> .Default; _sectionData = new Dictionary <string, section>(_searchComparer); foreach (var sectionData in ori) { _sectionData.Add(sectionData.SectionName, (section)sectionData.Clone()); } ; }
public void Merge(section_collection sectionsToMerge) { foreach (var sectionDataToMerge in sectionsToMerge) { var sectionDataInThis = GetSectionData(sectionDataToMerge.SectionName); if (sectionDataInThis == null) { AddSection(sectionDataToMerge.SectionName); } this[sectionDataToMerge.SectionName].Merge(sectionDataToMerge.Keys); } }
public non_sense_data(section_collection sdc) : base(new section_collection(sdc, StringComparer.OrdinalIgnoreCase)) { Global = new key_collection(StringComparer.OrdinalIgnoreCase); }
public data(section_collection sdc) { _sections = (section_collection)sdc.Clone(); Global = new key_collection(); SectionKeySeparator = '.'; }