Exemple #1
0
 public void Cook(Bowl bowl, Vegetable[] vegetables)
 {
     foreach (var vegetable in vegetables)
     {
         this.Peel(vegetable);
         this.Cut(vegetable);
         bowl.Add(vegetable);
     }
 }
Exemple #2
0
 private void Cut(Vegetable vegetable)
 {
     // ...
 }
Exemple #3
0
 private void Peel(Vegetable vegetable)
 {
     // ...
 }
Exemple #4
0
        public void Add(Vegetable vegetable)
        {
            // throw overvegetable Exception

            // more code
        }