Exemple #1
0
        static void Main(string[] args)
        {
            Sandwich sandwich = Sandwich.Builder()
                                .Size(Size.XL)
                                .Sauce(Sauce.Ketchup)
                                .Meat(Meat.Chicken)
                                .WithCheese(true)
                                .IsSpicy(true)
                                .IsCold(false)
                                .Build();

            Console.WriteLine(sandwich);

            Console.ReadKey();
        }
Exemple #2
0
        static void Main(string[] args)
        {
            Console.WriteLine("Hello World!");

            SandwichDirector sandwichDirector = new SandwichDirector(new MySandwichBuilder());

            sandwichDirector.buildSandwich();
            Sandwich sandwich1 = sandwichDirector.getSandwhich();

            sandwich1.display();

            SandwichDirector sandwichDirector2 = new SandwichDirector(new ClubSandwichBuilder());

            sandwichDirector2.buildSandwich();
            Sandwich sandwich2 = sandwichDirector2.getSandwhich();

            sandwich2.display();
        }
Exemple #3
0
 public void CreateSandwich()
 {
     Sandwich = new Sandwich();
 }
Exemple #4
0
 public void CreateNewSandwich()
 {
     sandwich = new Sandwich();
 }
Exemple #5
0
 public BLT()
 {
     sandwich = new Sandwich("BLT");
 }
Exemple #6
0
 public TurkeyClub()
 {
     sandwich = new Sandwich("Turkey Club");
 }
Exemple #7
0
 public HamAndCheese()
 {
     sandwich = new Sandwich("Ham and Cheese");
 }
 public void CreateNewSandwich()
 {
     this.sandwitch = new Sandwich();
 }
 public void CreateNewSandwich()
 {
     this.sandwitch = new Sandwich();
 }