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(); } }
public IniData(SectionDataCollection sdc) { mSections = (SectionDataCollection)sdc.Clone(); }