コード例 #1
0
 private static void PrintProductDetails(BakeryComponent product)
 {
     Console.WriteLine(); // some whitespace for readability
     Console.WriteLine("Item: {0}, Price: {1}", product.GetName(), product.GetPrice());
 }
コード例 #2
0
ファイル: Program.cs プロジェクト: ikkhannn/design-patterns
 private static void PrintProductDetails(BakeryComponent product)
 {
     Console.WriteLine(); // some whitespace for readability
     Console.WriteLine("Item: {0}, Price: {1}", product.GetName(), product.GetPrice());
 }
コード例 #3
0
 public NameCardDecorator(BakeryComponent baseComponent)
     : base(baseComponent)
 {
     this.m_Name  = "Name Card";
     this.m_Price = 4.0;
 }
コード例 #4
0
 public ArtificialScentDecorator(BakeryComponent baseComponent)
     : base(baseComponent)
 {
     this.m_Name  = "Artificial Scent";
     this.m_Price = 3.0;
 }
コード例 #5
0
 public ArtificialScentDecorator(BakeryComponent baseComponent)
     : base(baseComponent)
 {
     this.m_Name = "Artificial Scent";
     this.m_Price = 3.0;
 }
コード例 #6
0
 public CreamDecorator(BakeryComponent baseComponent)
     : base(baseComponent)
 {
     this.m_Name  = "Cream";
     this.m_Price = 1.0;
 }
コード例 #7
0
 public NameCardDecorator(BakeryComponent baseComponent)
     : base(baseComponent)
 {
     this.m_Name = "Name Card";
     this.m_Price = 4.0;
 }
コード例 #8
0
 public CherryDecorator(BakeryComponent baseComponent)
     : base(baseComponent)
 {
     this.m_Name  = "Cherry";
     this.m_Price = 2.0;
 }
コード例 #9
0
 public CreamDecorator(BakeryComponent baseComponent)
     : base(baseComponent)
 {
     this.m_Name = "Cream";
     this.m_Price = 1.0;
 }
コード例 #10
0
 protected Decorator(BakeryComponent baseComponent)
 {
     m_BaseComponent = baseComponent;
 }
コード例 #11
0
 public CherryDecorator(BakeryComponent baseComponent)
     : base(baseComponent)
 {
     this.m_Name = "Cherry";
     this.m_Price = 2.0;
 }
コード例 #12
0
 protected Decorator(BakeryComponent baseComponent)
 {
     m_BaseComponent = baseComponent;
 }