private static BulkSolutionRepresenterResult RunSingle(BulkSolution solution) { var stopwatch = Stopwatch.StartNew(); RunRepresenter(solution); stopwatch.Stop(); return(CreateBulkSolutionRepresenterResult(solution, stopwatch.Elapsed)); }
private static string ReadRepresentation(this BulkSolution solution) => File.ReadAllText(Path.Combine(solution.Directory, "representation.txt"));
public static BulkSolutionRepresentation Read(BulkSolution solution) => new BulkSolutionRepresentation(solution.ReadRepresentation());
public BulkSolutionRepresenterResult(BulkSolution solution, BulkSolutionRepresentation representation, TimeSpan elapsed) => (Solution, Representation, Elapsed) = (solution, representation, elapsed);
private static BulkSolutionRepresenterResult CreateBulkSolutionRepresenterResult(BulkSolution solution, TimeSpan elapsed) => new BulkSolutionRepresenterResult(solution, BulkSolutionRepresentationReader.Read(solution), elapsed);
private static void RunRepresenter(BulkSolution solution) => CSharp.Program.Main(new[] { solution.Slug, solution.Directory, solution.Directory });