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