コード例 #1
0
        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());
            }
            ;
        }
コード例 #2
0
        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);
            }
        }
コード例 #3
0
 public non_sense_data(section_collection sdc)
     : base(new section_collection(sdc, StringComparer.OrdinalIgnoreCase))
 {
     Global = new key_collection(StringComparer.OrdinalIgnoreCase);
 }
コード例 #4
0
 public data(section_collection sdc)
 {
     _sections           = (section_collection)sdc.Clone();
     Global              = new key_collection();
     SectionKeySeparator = '.';
 }