Beispiel #1
0
        int ProcessLine(string line)
        {
            IniSection.FixLine(ref line);
            if (line.Length == 0)
            {
                return(0);
            }

            // Test if this line contains start of new section i.e. matches [*]
            if ((line[0] == '[') && (line[line.Length - 1] == ']'))
            {
                string sectionName = line.Substring(1, line.Length - 2);
                var    iniSection  = new IniSection(sectionName, Sections.Count);
                Sections.Add(iniSection);
                CurrentSection = iniSection;
            }
            else if (CurrentSection != null)
            {
                return(CurrentSection.ParseLine(line));
            }
            return(0);
        }