6.1.4: e.g. 6.9 Adding a Property to an Implementation Class

chap6
Jason Zhu 2021-08-10 22:52:47 +10:00
parent 02b80da83f
commit cbd679abba
1 changed files with 2 additions and 1 deletions

View File

@ -32,9 +32,10 @@ namespace NinjectDemo
public class DefaultDiscountHelper : IDiscountHelper public class DefaultDiscountHelper : IDiscountHelper
{ {
public decimal DiscountSize { get; set; }
public decimal ApplyDiscount(decimal totalParam) public decimal ApplyDiscount(decimal totalParam)
{ {
return (totalParam - (10m / 100m * totalParam)); return (totalParam - (DiscountSize * totalParam));
} }
} }
} }