Inheritance: ICloneable
Ejemplo n.º 1
0
 public object Clone()
 {
     var global = new SolutionGlobal();
     foreach (var section in this.Sections)
     {
         global.Sections.Add(section.Clone() as SolutionGlobal.Section);
     }
     return global;
 }
Ejemplo n.º 2
0
        public object Clone()
        {
            var global = new SolutionGlobal();

            foreach (var section in this.Sections)
            {
                global.Sections.Add(section.Clone() as SolutionGlobal.Section);
            }
            return(global);
        }
Ejemplo n.º 3
0
 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());
         }
     }
 }