Ejemplo n.º 1
0
 public HomeController(Mailer mailer, ISolutionEvaluator solutionEvaluator,
                       IProblemGenerator problemGenerator, SolutionRepository solutionRepository,
                       RegistrationRepository registrationRepository)
 {
     _mailer                 = mailer ?? throw new ArgumentNullException(nameof(mailer));
     _solutionEvaluator      = solutionEvaluator ?? throw new ArgumentNullException(nameof(solutionEvaluator));
     _problemGenerator       = problemGenerator ?? throw new ArgumentNullException(nameof(problemGenerator));
     _solutionRepository     = solutionRepository ?? throw new ArgumentNullException(nameof(solutionRepository));
     _registrationRepository = registrationRepository ?? throw new ArgumentNullException(nameof(registrationRepository));
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ProblemGenerationRunner"/> class.
 /// </summary>
 /// <param name="settings"><inheritdoc cref="_settings" path="/summary"/></param>
 /// <param name="generator"><inheritdoc cref="_generator" path="/summary"/></param>
 /// <param name="analyzer"><inheritdoc cref="_analyzer" path="/summary"/>.</param>
 /// <param name="resolver"><inheritdoc cref="_resolver" path="/summary"/></param>
 /// <param name="factory"><inheritdoc cref="_factory" path="/summary"/></param>
 /// <param name="tracker"><inheritdoc cref="_tracker" path="/summary"/></param>
 public ProblemGenerationRunner(ProblemGenerationRunnerSettings settings,
                                IProblemGenerator generator,
                                IGeneratedProblemAnalyzer analyzer,
                                ITheoremSorterTypeResolver resolver,
                                IRankedTheoremJsonLazyWriterFactory factory,
                                IInferenceRuleUsageTracker tracker)
 {
     _settings  = settings ?? throw new ArgumentNullException(nameof(settings));
     _generator = generator ?? throw new ArgumentNullException(nameof(generator));
     _analyzer  = analyzer ?? throw new ArgumentNullException(nameof(analyzer));
     _resolver  = resolver ?? throw new ArgumentNullException(nameof(resolver));
     _factory   = factory ?? throw new ArgumentNullException(nameof(factory));
     _tracker   = tracker ?? throw new ArgumentNullException(nameof(tracker));
 }
Ejemplo n.º 3
0
 public SolutionEvaluator(IProblemGenerator problemGenerator, ILogger <SolutionEvaluator> log)
 {
     _problemGenerator = problemGenerator ?? throw new ArgumentNullException(nameof(problemGenerator));
     _log = log ?? throw new ArgumentNullException(nameof(log));
 }
Ejemplo n.º 4
0
 public SolutionEvaluator(IDistanceCalculator distanceCalculator, IProblemGenerator problemGenerator)
 {
     _distanceCalculator = distanceCalculator ?? throw new ArgumentNullException(nameof(distanceCalculator));
     _problemGenerator   = problemGenerator ?? throw new ArgumentNullException(nameof(problemGenerator));
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="GenerationOnlyProblemGenerationRunner"> class.
 /// </summary>
 /// <param name="settings">The settings for the runner.</param>
 /// <param name="generator">The generator of problems.</param>
 public GenerationOnlyProblemGenerationRunner(GenerationOnlyProblemGenerationRunnerSettings settings, IProblemGenerator generator)
 {
     _settings  = settings ?? throw new ArgumentNullException(nameof(settings));
     _generator = generator ?? throw new ArgumentNullException(nameof(generator));
 }