Example #1
0
        public Task <IBenchmarkedSolution> GetBenchmarkedSolutionAsync(IProblem problem)
        {
            var existingSolutions = solutions.Where(x => x.ProblemNumber == problem.Number);

            if (!HasSolution(problem))
            {
                throw new InvalidOperationException("problem not solved");
            }

            return(Task.FromResult((IBenchmarkedSolution)BenchmarkedSolution.Create(existingSolutions.First())));
        }