예제 #1
0
 public CherryDecorator(IBakeryComponent baseComponent) : base(baseComponent)
 {
     this.m_Name  = "Cherry";
     this.m_Price = 2.0;
 }
예제 #2
0
 public CreamDecorator(IBakeryComponent baseComponent) : base(baseComponent)
 {
     this.m_Name  = "Cream";
     this.m_Price = 10.0;
 }
예제 #3
0
 protected Decorator(IBakeryComponent baseComponent)
 {
     m_BaseComponent = baseComponent;
 }
예제 #4
0
 public NamemDecorator(IBakeryComponent baseComponent) : base(baseComponent)
 {
     this.m_Name  = "NAme";
     this.m_Price = 500.0;
 }
예제 #5
0
 public NameCardDecorator(IBakeryComponent baseComponent) : base(baseComponent)
 {
     m_Name  = "Name Card";
     m_Price = 4.0;
 }
예제 #6
0
 public ArtificialScent(IBakeryComponent baseComponent) : base(baseComponent)
 {
     this.m_Name  = "Artificial Scent";
     this.m_Price = 3.0;
 }
예제 #7
0
 private static void PrintProductDetails(IBakeryComponent cBase)
 {
     Console.WriteLine(string.Format("Item: {0}, Price: {1}", cBase.GetName(), cBase.GetPrice()));
 }
예제 #8
0
 private static void PrintProductDetails(IBakeryComponent component)
 {
     Console.WriteLine(); // some whitespace for readability
     Console.WriteLine("Item: {0}, Price: {1}", component.GetName(), component.GetPrice());
 }