Exemplo n.º 1
0
        private void ParseProjectSection(SolutionProject project, List <string> lines, ref int lineIndex)
        {
            var section = new SolutionProject.Section();

            project.Sections.Add(section);
            bool more = true;

            while (more && lineIndex < lines.Count)
            {
                string line = lines[lineIndex++];
                if (line.StartsWith("\tEndProjectSection"))
                {
                    more = false;
                }
                else if (line.StartsWith("\tProjectSection"))
                {
                    int index = line.IndexOf('(') + 1;
                    section.SectionName = line.Substring(index, line.IndexOf(')', index) - index);
                    index = line.IndexOf("= ", index) + 2;
                    section.PrePostProject = line.Substring(index);
                }
                else
                {
                    section.SectionItems.Add(line.Trim());
                }
            }
        }
Exemplo n.º 2
0
        private void ParseProjectSection(SolutionProject project, List<string> lines, ref int lineIndex)
        {
            var section = new SolutionProject.Section();
            project.Sections.Add(section);
            bool more = true;
            while (more && lineIndex < lines.Count)
            {
                string line = lines[lineIndex++];
                if (line.StartsWith("\tEndProjectSection"))
                {
                    more = false;
                }
                else if (line.StartsWith("\tProjectSection"))
                {
                    int index = line.IndexOf('(') + 1;
                    section.SectionName = line.Substring(index, line.IndexOf(')', index) - index);
                    index = line.IndexOf("= ", index) + 2;
                    section.PrePostProject = line.Substring(index);

                }
                else
                {
                    section.SectionItems.Add(line.Trim());
                }
            }
        }