コード例 #1
0
        public IsolatedWorkspaceManager(string reason, string baseDirectory, string testNupkgDirectory, string packageCachePath, string downloadCachePath)
        {
            baseDirectory      = Path.GetFullPath(baseDirectory);
            testNupkgDirectory = Path.GetFullPath(testNupkgDirectory);
            packageCachePath   = Path.GetFullPath(packageCachePath);
            downloadCachePath  = Path.GetFullPath(downloadCachePath);

            Directory.CreateDirectory(baseDirectory);

            workspaceDirectory = Utils.CreateUniqueDirectory(baseDirectory);

            toolResolver = new ToolResolver(downloadCachePath);

            reasonFile = File.CreateText(Path.Combine(workspaceDirectory, "Reason.txt"));
            reasonFile.WriteLine(reason);
            reasonFile.WriteLine();
            reasonFile.Flush();

            WriteNuGetConfig(baseDirectory, testNupkgDirectory, packageCachePath);
        }
        public IsolatedWorkspaceManager(string reason, string baseDirectory, string testNupkgDirectory, string packageCachePath, string downloadCachePath)
        {
            baseDirectory      = Path.GetFullPath(baseDirectory);
            testNupkgDirectory = Path.GetFullPath(testNupkgDirectory);
            packageCachePath   = Path.GetFullPath(packageCachePath);
            downloadCachePath  = Path.GetFullPath(downloadCachePath);

            Directory.CreateDirectory(baseDirectory);

            workspaceDirectory = Utils.CreateMutexDirectory(baseDirectory);

            toolResolver = new ToolResolver(downloadCachePath);

            reasonFile = File.CreateText(Path.Combine(workspaceDirectory.DirectoryPath, "Reason.txt"));
            reasonFile.WriteLine(reason);
            reasonFile.WriteLine();
            reasonFile.Flush();

            WriteNuGetConfig(baseDirectory, testNupkgDirectory, packageCachePath);

            File.WriteAllText(Path.Combine(baseDirectory, "Directory.Build.props"), "<Project />");
            File.WriteAllText(Path.Combine(baseDirectory, "Directory.Build.targets"), "<Project />");
        }
コード例 #3
0
 public IsolatedWorkspace(DirectoryMutex directoryMutex, ToolResolver toolResolver)
 {
     this.directoryMutex = directoryMutex ?? throw new ArgumentNullException(nameof(toolResolver));;
     this.toolResolver   = toolResolver ?? throw new ArgumentNullException(nameof(toolResolver));
 }
コード例 #4
0
 public IsolatedWorkspace(string directory, ToolResolver toolResolver)
 {
     Directory         = directory;
     this.toolResolver = toolResolver ?? throw new ArgumentNullException(nameof(toolResolver));
 }