示例#1
0
        public void Run()
        {
            _loggerService.RecordLog(LogTypes.Event, "Application started.");
            do
            {
                _option = _uIHandller.GetOperationInput(_resolver.Operations);
                _operationPerformer.SetOperation(_resolver.ResolveOperation(_option));
                _numbers = _uIHandller.GetNumbersInput();
                _result  = _operationPerformer.PerformOperation(_numbers);
                _uIHandller.DisplayOutput(_option, _result, _numbers);

                _next = _uIHandller.GetExitOption();
            }while (_next);
            _loggerService.RecordLog(LogTypes.Event, "Application ended.");
        }
示例#2
0
 private double CalculatePair(string option, double firstOperand, double secondOperand)
 {
     _operationPerformer.SetOperation(_resolver.ResolveOperation(option));
     return(_operationPerformer.PerformOperation(firstOperand, secondOperand));
 }