public void OnReceive(CreditChecked message) { Console.WriteLine("LoanBroker: " + message); var process = ProcessOf(message.CreditProcessingReferenceId); process.Tell( new EstablishCreditScoreForLoanRateQuote( message.CreditProcessingReferenceId, message.TaxId, message.Score), Self); }
public void OnReceive(CheckCredit message) { Console.WriteLine("CreditBureau: " + message); int range = creditRanges[randomCreditRangeGenerator.Next(5)]; int score = range + randomCreditScoreGenerator.Next(20); CreditChecked creditChecked = new CreditChecked( message.CreditProcessingReferenceId, message.TaxId, score); Console.WriteLine("CreditBureau: Telling: " + creditChecked); Sender.Tell(creditChecked, Self); }