Esempio n. 1
0
        static Section HandleProjectConfigurationPlatforms(SolutionFile s, Reader r, string step, IEnumerable <PropertyLine> propertyLines)
        {
            foreach (var propertyLine in propertyLines)
            {
                var match = _rParseProjectConfigurationPlatformsName.Match(propertyLine.Name);
                if (!match.Success)
                {
                    r.Monitor.Fatal($"Invalid format for a project configuration name on line #{r.LineNumber}. Found: {r.Line}. Expected: A line respecting the pattern '{PatternParseProjectConfigurationPlatformsName}'.");
                    return(null);
                }

                var projectGuid = match.Groups["GUID"].Value;
                var description = match.Groups["DESCRIPTION"].Value;
                var left        = s.FindProjectByGuid(r.Monitor, projectGuid, propertyLine.LineNumber);
                if (left is Project p)
                {
                    p.AddProjectConfigurationPlatform(new PropertyLine(description, propertyLine.Value));
                }
                else
                {
                    r.Monitor.Warn($"Project configuration targets a Solution folder. Line #{r.LineNumber}: {r.Line}.");
                }
            }
            return(new Section(s, "ProjectConfigurationPlatforms", step));
        }
Esempio n. 2
0
 static Section HandleNestedProjects(
     SolutionFile s,
     Reader r,
     string step,
     IEnumerable <PropertyLine> propertyLines)
 {
     foreach (var propertyLine in propertyLines)
     {
         var left = s.FindProjectByGuid(r.Monitor, propertyLine.Name, propertyLine.LineNumber);
         if (left == null)
         {
             return(null);
         }
         left.ParentFolderGuid = propertyLine.Value;
     }
     return(new Section(s, "NestedProjects", step));
 }