Beispiel #1
0
        public void InsertValue(String sectionName, String valueName, String value)
        {
            IniSection sec = GetSectionByName(sectionName);

            if (sec == null)
            {
                // Section doesn't yet exist, so insert it
                InsertSection(sectionName);
            }
            sec = GetSectionByName(sectionName);
            sec.InsertValue(valueName, value);
        }
Beispiel #2
0
        public void InsertSection(IniSection section)
        {
            IniSection sec = GetSectionByName(section.sectionName);

            if (sec == null)
            {
                // Section by this name does not exist
                sections.Add(sec);
            }
            else
            {
                // Section by this name exists, simply insert values
                foreach (DictionaryEntry de in section.sectionValues)
                {
                    sec.InsertValue((String)de.Key, (String)de.Value);
                }
            }
        }