/// <summary> /// Get the generated binary expression. /// </summary> /// <returns>The generated binary expression.</returns> public ExpressionSyntax GetBinaryExpression() { var binaryExpression = BinaryExpression(MathOperatorFactory.GetSyntaxKind(_mathOperator), _leftExpression, _rightExpression); if (_useParenthes) { return(ParenthesizedExpression(binaryExpression)); } return(binaryExpression); }
public CalculatorController(ILog log, MathOperatorFactory mathOperatorFactory) { _log = log; _mathOperatorFactory = mathOperatorFactory; // TODO: use ISettingProvider /w AutoFac instead of directly calling ConfigurationManager var calculationAddedDelay = ConfigurationManager.AppSettings["CalculationAddedDelay"]; if (int.TryParse(calculationAddedDelay, out var calculationAddedDelayInt)) { _calculationAddedDelay = calculationAddedDelayInt; } }
public OperatorsController(ILog log, MathOperatorFactory mathOperatorFactory) { _log = log; _mathOperatorFactory = mathOperatorFactory; }