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 />"); }
public IsolatedWorkspace(DirectoryMutex directoryMutex, ToolResolver toolResolver) { this.directoryMutex = directoryMutex ?? throw new ArgumentNullException(nameof(toolResolver));; this.toolResolver = toolResolver ?? throw new ArgumentNullException(nameof(toolResolver)); }
public IsolatedWorkspace(string directory, ToolResolver toolResolver) { Directory = directory; this.toolResolver = toolResolver ?? throw new ArgumentNullException(nameof(toolResolver)); }