Beispiel #1
0
        public IActionResult Get(double leftInput, double rightInput, int logicCode)
        {
            string result = string.Empty;

            try
            {
                result = _probabilityCalculationService.GetCalculationResult(
                    leftInput,
                    rightInput,
                    logicCode
                    ).Result.ToString();
            }
            catch (Exception ex)
            {
                _logger.LogWarning(
                    ex.StackTrace.ToString(),
                    leftInput,
                    rightInput,
                    logicCode
                    );

                return(StatusCode(StatusCodes.Status500InternalServerError));
            }

            return(Ok(new { calculationResult = result }));
        }