public TableauSolutionModel(
     ConversionService conversionService,
     EventService eventService,
     TableauSolutionService tableauSolutionService)
 {
     ConversionService      = conversionService;
     EventService           = eventService;
     TableauSolutionService = tableauSolutionService;
 }
示例#2
0
 public TsController(
     TableauSolutionService tableauSolutionService,
     EventService eventService,
     FormulaValidator formulaValidator)
 {
     EventService           = eventService;
     TableauSolutionService = tableauSolutionService;
     FormulaValidator       = formulaValidator;
 }
示例#3
0
        public IActionResult SolveTableau([FromBody] TableauInput tableauInput)
        {
            if (tableauInput == null || !HasValidFormulas(tableauInput))
            {
                return(BadRequest("The request could not be understood by the server due to malformed syntax."));
            }

            var tableauSolution = TableauSolutionService.ComputeTableauSolution(tableauInput);

            EventService.LogTableauSolution(tableauSolution);

            return(Ok(tableauSolution));
        }