private static void AssembleHeader(StringBuilder builder, TransformableProject project)
 {
     builder.AppendFormat("Project(\"{0}\") = \"{1}\", \"{2}\", \"{3}\"" + Environment.NewLine,
                          '{' + project.TypeGuid.ToString().ToUpperInvariant() + '}',
                          project.Name,
                          !string.IsNullOrEmpty(project.PreviousName)
                              ? project.Path.Replace(project.PreviousName, project.Name)
                              : project.Path,
                          '{' + project.Guid.ToString().ToUpperInvariant() + '}');
 }
 private void WriteProjectReferences(TransformableProject p)
 {
     DocumentedProjects.ForEach(t =>
     {
         var doc       = new ProjectDocument(t, ParserInfo);
         var reference = doc.ProjectReferences.FirstOrDefault(pr => pr.Project.Equals(p.Guid));
         if (reference == null)
         {
             return;
         }
         reference.Include = reference.Include.Replace(p.PreviousName, p.Name);
         reference.Name    = p.Name;
         doc.Write();
     });
 }
 private static void AssembleProjectSection(StringBuilder builder, TransformableProject project)
 {
     if (project.ProjectSection == null)
     {
         return;
     }
     builder.AppendFormat("\tProjectSection({0}) = {1}" + Environment.NewLine,
                          project.ProjectSection.Name,
                          char.ToLowerInvariant(project.ProjectSection.Type.ToString()[0]) +
                          project.ProjectSection.Type.ToString().Substring(1));
     foreach (var entry in project.ProjectSection.Entries)
     {
         builder.AppendFormat("\t\t{0} = {1}" + Environment.NewLine, entry.Key, entry.Value);
     }
     builder.Append("\tEndProjectSection" + Environment.NewLine);
 }
 public void SetUp()
 {
     _solutionProject = new ParserProject(Guid.NewGuid(), "TestProject", "src/TestProject/TestProject.csproj",
                                          Guid.NewGuid());
     _project = new TransformableProject(_solutionProject);
 }