Example #1
0
        public void WriteData(StreamWriter writer, IniData iniData)
        {
            SectionDataCollection sdc = iniData.Sections;

            foreach (SectionData sd in sdc)
            {
                foreach (string sectionComment in sd.Comments)
                {
                    writer.WriteLine(string.Format("{0}{1}", CommentDelimiter, sectionComment));
                }
                writer.WriteLine(string.Format("{0}{1}{2}", SectionDelimiters[0], sd.SectionName, SectionDelimiters[1]));

                foreach (KeyData kd in sd.Keys)
                {
                    foreach (string keyComment in kd.Comments)
                    {
                        writer.WriteLine(string.Format("{0}{1}", CommentDelimiter, keyComment));
                    }
                    writer.WriteLine(string.Format("{0} {1} {2}", kd.KeyName, KeyValueDelimiter, kd.Value));
                }

                writer.WriteLine();
            }
        }
 public SectionDataCollection(SectionDataCollection ori)
 {
     mSectionData = new Dictionary <string, SectionData>(ori.mSectionData);
 }
Example #3
0
 public IniData(SectionDataCollection sdc)
 {
     mSections = (SectionDataCollection)sdc.Clone();
 }
Example #4
0
 public IniData()
 {
     mSections = new SectionDataCollection();
 }