Example #1
0
        SolutionChapter ParseChapter(FilePath basePath, List <string> lines)
        {
            SolutionChapter result = null;
            var             start  = lines[0];
            var             end    = lines[lines.Count - 1];

            if (start.StartsWith("Project"))
            {
                result = new SolutionProject(start, end, basePath);
            }
            else if (start.StartsWith("Global"))
            {
                result = new GlobalChapter();
            }
            else
            {
                result = new SolutionChapter(start, end);  // Unknown, just keep it
            }
            var sectionLines = Split(Inner(lines), l => l[1] != 'E' && l[1] != '\t');

            foreach (var section in sectionLines.Select(z => ParseSection(z)))
            {
                result.Sections.Add(section);
            }
            return(result);
        }
Example #2
0
 public void Add(SolutionProject project)
 {
     foreach (var platform in globalChapter.SolutionConfigurationPlatforms)
     {
         AddValue(project, platform, "ActiveCfg");
         AddValue(project, platform, "Build.0");
     }
 }
Example #3
0
        public void Remove(SolutionProject project)
        {
            var regex = new Regex(Regex.Escape(project.Id.ToString()), RegexOptions.IgnoreCase);

            foreach (var value in Values.ToList().Where(v => regex.IsMatch(v.Key)))
            {
                Values.Remove(value);
            }
        }
		public bool ShouldApply(SolutionProject project)
		{
			if (project.IsFolder) {
				return false;  // Don't touch folders
			}
			foreach (var validProject in projects) {
				if (IsCorrectProject(project, validProject)) {
					return true;
				}
			}
			return false;
		}
Example #5
0
 public void Add(SolutionProject project)
 {
     chapters.Add(project);
     Globals.ProjectConfigurationPlatforms.Add(project);
 }
Example #6
0
 public void Remove(SolutionProject project)
 {
     chapters.Remove(project);
     Globals.ProjectConfigurationPlatforms.Remove(project);
 }
 public ConvertProjectToAssembly(SolutionProject project)
 {
     this.project = project;
 }
 public ConvertAssemblyToProject(SolutionProject project)
 {
     this.project = project;
 }
Example #9
0
 public void Add(SolutionProject project) {
     chapters.Add(project);
     Globals.ProjectConfigurationPlatforms.Add(project);
 }
Example #10
0
 public void Remove(SolutionProject project)
 {
     chapters.Remove(project);
     Globals.ProjectConfigurationPlatforms.Remove(project);
 }
		bool IsCorrectProject(SolutionProject project, string projectName) {
			return StringComparer.InvariantCultureIgnoreCase.Equals(
				StandardRename.GetFileNameWithoutExtension(project.Path.Path),
				projectName);
		}
Example #12
0
 void AddValue(SolutionProject project, string platform, string build)
 {
     Values.Add(new KeyValuePair <string, string>(string.Format("{0}.{1}.{2}", project, platform, build), platform));
 }
 public bool ShouldApply(SolutionProject project)
 {
     return !project.IsFolder;
 }