public object Clone() { var global = new SolutionGlobal(); foreach (var section in this.Sections) { global.Sections.Add(section.Clone() as SolutionGlobal.Section); } return global; }
public object Clone() { var global = new SolutionGlobal(); foreach (var section in this.Sections) { global.Sections.Add(section.Clone() as SolutionGlobal.Section); } return(global); }
private void ParseGlobalSection(SolutionGlobal global, List<string> lines, ref int lineIndex) { var section = new SolutionGlobal.Section(); global.Sections.Add(section); bool more = true; while (more && lineIndex < lines.Count) { string line = lines[lineIndex++]; if (line.StartsWith("\tEndGlobalSection")) { more = false; } else if (line.StartsWith("\tGlobalSection")) { int index = line.IndexOf('(') + 1; section.SectionName = line.Substring(index, line.IndexOf(')', index) - index); index = line.IndexOf("= ", index) + 2; section.PrePostSolution = line.Substring(index); } else { section.SectionItems.Add(line.Trim()); } } }