コード例 #1
0
 public override int GetCost()
 {
     return(Coffee.GetCost() + 5);
 }
コード例 #2
0
 public CoffeeWithSugarDecorator(Coffee coffee) : base(coffee.Name + ",с сахором", coffee)
 {
 }
コード例 #3
0
 protected CoffeeDecorator(string name, Coffee coffee) : base(name)
 {
     Coffee = coffee;
 }
コード例 #4
0
 public CoffeeWithMilkDecorator(Coffee coffee) : base(coffee.Name + ",с молоком", coffee)
 {
 }
コード例 #5
0
 public CoffeeWithChocolateSyrupDecorator(Coffee coffee) : base(coffee.Name + ",с шоколадным сиропом", coffee)
 {
 }