Ejemplo n.º 1
0
 public void add(IniFile f)
 {
     foreach (IniSection s in f.sections.Values)
     {
         if (!sections.ContainsKey(s.name))
         {
             sections.Add(s.name, new IniSection(s.name));
         }
         IniSection ms = sections[s.name];
         foreach (string ent in s.entries.Values)
         {
             ms.addLine(ent);
         }
     }
 }
Ejemplo n.º 2
0
        public void flatten()
        {
            IniSection flat = sections[""];
            LinkedList <IniSection> dellist = new LinkedList <IniSection>();

            foreach (IniSection s in sections.Values)
            {
                if (s.name == "")
                {
                    continue;
                }
                foreach (string line in s.entries.Values)
                {
                    flat.addLine(line);
                }
                dellist.AddLast(s);
            }
            foreach (IniSection s in dellist)
            {
                sections.Remove(s.name);
            }
        }