public void OnReceive(BankLoanRateQuoted message) { Console.WriteLine("LoanBroker: " + message); var process = ProcessOf(message.LoanQuoteReferenceId); process.Tell( new RecordLoanRateQuote( message.BankId, message.BankLoanRateQuoteId, message.InterestRate), Self); }
public void OnReceive(QuoteLoanRate message) { var interestRate = CalculateInterestRate( (double)message.Amount, (double)message.TermInMonths, (double)message.CreditScore); var quoted = new BankLoanRateQuoted( this.bankId, this.randomQuoteId.Next(1000).ToString(), message.LoanQuoteReferenceId, message.TaxId, interestRate); Sender.Tell(quoted, Self); }
public void OnReceive(QuoteLoanRate message) { var interestRate = CalculateInterestRate( (double) message.Amount, (double) message.TermInMonths, (double) message.CreditScore); var quoted = new BankLoanRateQuoted( this.bankId, this.randomQuoteId.Next(1000).ToString(), message.LoanQuoteReferenceId, message.TaxId, interestRate); Sender.Tell(quoted, Self); }