File tree Expand file tree Collapse file tree 3 files changed +6
-6
lines changed
src/StructuralPatterns/Facade/FacadeLibrary/MortgageExample Expand file tree Collapse file tree 3 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -18,9 +18,9 @@ public Mortgage()
1818 _customerService = new CustomerService ( ) ;
1919 }
2020
21- public bool IsEligible ( string customerName , int loanAmount )
21+ public bool IsEligible ( string customerName , decimal loanAmount )
2222 {
23- Console . WriteLine ( $ "Customer { customerName } applies for { loanAmount : C} loan.\n ") ;
23+ Console . WriteLine ( $ "Customer { customerName } wants to apply for { loanAmount : C} loan.\n ") ;
2424
2525 var customer = _customerService . Find ( customerName ) ;
2626
Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ public static void Execute()
1313 var mortgage = new Mortgage ( ) ;
1414 var customerName = "Mario Balotelli" ;
1515
16- // Evaluate mortgage eligibility for customer
16+ // Evaluate mortgage eligibility for the customer.
1717 bool isEligible = mortgage . IsEligible ( customerName , 125000 ) ;
1818
1919 var status = isEligible ? "approved" : "rejected" ;
Original file line number Diff line number Diff line change @@ -4,9 +4,9 @@ public class CustomerService
44 {
55 public Customer Find ( string name )
66 {
7- // Naive implementation
8- // In real life scenario we need to have customer registry
9- // There may be multiple customers with the same name
7+ // Naive implementation.
8+ // In real life scenario we would need some customer registry.
9+ // There may be multiple customers with the same name.
1010 return new Customer { Name = name } ;
1111 }
1212 }
You can’t perform that action at this time.
0 commit comments