示例#1
0
        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);
        }
示例#2
0
        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);
        }
示例#3
0
        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);
        }
示例#4
0
        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);
        }