示例#1
0
        private static void ProduceReceipt(AbstractBeverageDecorator beverage)
        {
            Console.WriteLine("You have ordered a {0}", beverage.GetDescription());
            Console.WriteLine("The cost is {0:C}", beverage.GetCost());

            beverage.OtherMethods();
        }
示例#2
0
 protected BeverageDecorator(AbstractBeverageDecorator inner)
 {
     _inner = inner;
 }