public IniData ReadData(StreamReader reader, bool relaxedIniFormat)
        {
            mRelaxedIniFormat = relaxedIniFormat;

            if (reader == null)
            {
                throw new ArgumentNullException("reader", "The StreamReader object is null oO");
            }

            try {
                while (!reader.EndOfStream)
                {
                    ProcessLine(reader.ReadLine());
                }
                return(new IniData((SectionDataCollection)mCurrentTmpData.Clone()));
            } catch (Exception ex) {
                mCurrentTmpData.Clear();
                throw new ParsingException("Parseerror: " + ex.Message, ex);
            } finally {
                mCurrentTmpData.Clear();
            }
        }
Beispiel #2
0
 public IniData(SectionDataCollection sdc)
 {
     mSections = (SectionDataCollection)sdc.Clone();
 }