Esempio n. 1
0
        private void loadReader(IniReader reader)
        {
            reader.IgnoreComments = false;
            IniSection section = null;

            try
            {
                while (reader.Read())
                {
                    switch (reader.Type)
                    {
                    case enItemType.Section:
                        if (m_sections[reader.Name] != null)
                        {
                            m_sections.Remove(reader.Name);
                        }

                        section = new IniSection(reader.Name, reader.Comment);
                        m_sections.Add(section);
                        break;

                    case enItemType.Key:
                        if (section.GetValue(reader.Name) == null)
                        {
                            section.SetValue(reader.Name, reader.Value, reader.Comment);
                        }
                        break;
                    }
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
            finally
            {
                reader.Close();
            }
        }
Esempio n. 2
0
 internal IniException(IniReader reader, string message)
     : this(message)
 {
     m_reader  = reader;
     m_message = message;
 }