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()
18
18
_customerService = new CustomerService ( ) ;
19
19
}
20
20
21
- public bool IsEligible ( string customerName , int loanAmount )
21
+ public bool IsEligible ( string customerName , decimal loanAmount )
22
22
{
23
- Console . WriteLine ( $ "Customer { customerName } applies for { loanAmount : C} loan.\n ") ;
23
+ Console . WriteLine ( $ "Customer { customerName } wants to apply for { loanAmount : C} loan.\n ") ;
24
24
25
25
var customer = _customerService . Find ( customerName ) ;
26
26
Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ public static void Execute()
13
13
var mortgage = new Mortgage ( ) ;
14
14
var customerName = "Mario Balotelli" ;
15
15
16
- // Evaluate mortgage eligibility for customer
16
+ // Evaluate mortgage eligibility for the customer.
17
17
bool isEligible = mortgage . IsEligible ( customerName , 125000 ) ;
18
18
19
19
var status = isEligible ? "approved" : "rejected" ;
Original file line number Diff line number Diff line change @@ -4,9 +4,9 @@ public class CustomerService
4
4
{
5
5
public Customer Find ( string name )
6
6
{
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.
10
10
return new Customer { Name = name } ;
11
11
}
12
12
}
You can’t perform that action at this time.
0 commit comments