コード例 #1
0
        public Task Iterate()
        {
            _logger.LogDebug("Iteration started");
            var loan = GetLoanInfo();

            _logger.LogDebug("Calculation starting");
            var payments = _calculator.Calculate(loan);

            _logger.LogDebug("Calculation finished");

            _view.Write("Calculated payments:");
            _view.Write(payments?.JsonStringify() ?? "Incorrect input parameters (amount, downpayment).");

            _needRepeat = _view.NeedRepeat();
            _logger.LogDebug("Iteration finished");
            return(Task.CompletedTask);
        }