public static IEnumerable <AbsoluteFilePath> SourceCodeFilesIn(AbsoluteDirectoryPath projectDirectory) { return(Directory.EnumerateFiles( projectDirectory.ToString(), "*.cs", SearchOption.AllDirectories) .Select(AtmaFileSystemPaths.AbsoluteFilePath) .Where(IsNotInDirectory(projectDirectory, "obj"))); }
public static async Task RunWith(string arguments, AbsoluteDirectoryPath workingDirectory) { try { await Command.RunAsync("dotnet", arguments, workingDirectory.ToString()); } catch (ExitCodeException e) { throw new DotNetExeFailedException(arguments, workingDirectory, e.ExitCode, e); } }
private static string GetPathRelativeTo(AbsoluteDirectoryPath projectDirectory, AbsoluteFilePath file) { return(file.ToString().Replace(projectDirectory.ToString() + Path.DirectorySeparatorChar, "")); }