public void Alter(CsProjFile file, ProjectPlan plan)
        {
            var codeFile = file.Find<CodeFile>(AssemblyInfoPath) ?? file.Add<CodeFile>(AssemblyInfoPath);

            var path = file.PathTo(codeFile);
            var parentDirectory = path.ParentDirectory();
            if (!Directory.Exists(parentDirectory))
            {
                Directory.CreateDirectory(parentDirectory);
            }

            new FileSystem().AlterFlatFile(path, contents => Alter(contents, plan));
        }
Exemplo n.º 2
0
        public void Alter(CsProjFile file, ProjectPlan plan)
        {
            var assemblyInfoPath = Path.Combine(AssemblyInfoPath);
            var codeFile         = file.Find <CodeFile>(assemblyInfoPath) ?? file.Add <CodeFile>(assemblyInfoPath);

            var path            = file.PathTo(codeFile);
            var parentDirectory = path.ParentDirectory();

            if (!Directory.Exists(parentDirectory))
            {
                Directory.CreateDirectory(parentDirectory);
            }

            new FileSystem().AlterFlatFile(path, contents => Alter(contents, plan));
        }
Exemplo n.º 3
0
        public void Alter(CsProjFile file, ProjectPlan plan)
        {
            string   assemblyInfoPath = Path.Combine(this.AssemblyInfoPath);
            CodeFile codeFile         = file.Find <CodeFile>(assemblyInfoPath) ?? file.Add <CodeFile>(assemblyInfoPath);
            string   path             = file.PathTo(codeFile);
            string   parentDirectory  = FubuCore.StringExtensions.ParentDirectory(path);

            if (!Directory.Exists(parentDirectory))
            {
                Directory.CreateDirectory(parentDirectory);
            }
            new FileSystem().AlterFlatFile(path, delegate(List <string> contents)
            {
                this.Alter(contents, plan);
            });
        }
Exemplo n.º 4
0
 public void should_have_written_the_code_file_to_the_project()
 {
     theProject.Find <CodeFile>("Properties\\AssemblyInfo.cs")
     .ShouldNotBeNull();
 }
 public void copies_the_system_references_from_the_parent()
 {
     theTestingProject.Find <AssemblyReference>("System.Data").ShouldNotBeNull();
     theTestingProject.Find <AssemblyReference>("System.Configuration").ShouldNotBeNull();
 }
Exemplo n.º 6
0
 public void should_attach_the_view_to_the_csproj()
 {
     theProject.Find <Content>("Suite/Tools/MyView.spark".Replace('/', Path.DirectorySeparatorChar))
     .ShouldNotBeNull();
 }