예제 #1
0
        public void Add(Vegetable vegetable)
        {
            if (vegetable == null)
            {
                throw new ArgumentNullException("Can't add null object to bowl.");
            }

            this.vegetables.Add(vegetable);
        }
예제 #2
0
 public void Add(Vegetable vegetable)
 {
     if (vegetable.IsPeeled && vegetable.IsCut)
     {
         this.Content.Add(vegetable);
     }
     else
     {
         throw new ArgumentException("The vegetable shoud be peeled and cut.");
     }
 }
예제 #3
0
 private void Cut(Vegetable vegetable)
 {
 }
예제 #4
0
 private static void Peel(Vegetable vegetable)
 {
     Console.WriteLine("Peeling");
 }
예제 #5
0
 private void Cut(Vegetable vegetable)
 {
     // TODO: Cut vegetable
 }
예제 #6
0
 private void Peel(Vegetable vegetable)
 {
     // TODO: Peel vegetable
 }
예제 #7
0
 private static void Peel(Vegetable vegetable)
 {
     vegetable.Peel();
 }
예제 #8
0
파일: Chef.cs 프로젝트: vassil/CSharp
 /// <summary>
 /// Put the <paramref name="vegetable"/> in a bowl
 /// </summary>
 /// <param name="vegetable">Vegetable name</param>
 public void PutInBowl(Vegetable vegetable)
 {
     this.vegitablesInBowl.Add(vegetable);
 }
예제 #9
0
 private void Cut(Vegetable vegetable)
 {
     this.cookingLog.Add(
         string.Format(
         "Cut the {0}. (Not a single drop of blood.\r\n" +
         "I was blind but now I see I was born to be a chef.)",
         vegetable));
 }
예제 #10
0
 private void Wash(Vegetable vegetable)
 {
     this.cookingLog.Add(
         string.Format(
         "Washed the {0}.\r\n" +
         "(I think the aquarium should be in the kitchen.)",
         vegetable));
 }
예제 #11
0
 private void Peel(Vegetable vegetable)
 {
     vegetable.IsPeeled = true;
     this.cookingLog.Add(
         string.Format(
         "Peeled the {0}.\r\n" +
         "(What a useless operation. This is outrageous!)",
         vegetable));
 }
예제 #12
0
 private void MaybeNextTime(Vegetable vegetable)
 {
     this.cookingLog.Add(
         string.Format(
         "The {0} is rotten.\r\n" +
         "(They betrayed meeee! Wish I knew who bought this.)",
         vegetable));
 }
예제 #13
0
 private void Peel(Vegetable vegetable)
 {
     vegetable.IsPeeled = true;
 }
예제 #14
0
 private void Cut(Vegetable vegetable)
 {
     vegetable.IsCut = true;
 }
예제 #15
0
파일: Chef.cs 프로젝트: vassil/CSharp
 /// <summary>
 /// Cut the <paramref name="vegetable"/>
 /// </summary>
 /// <param name="vegetable">Vegetable name</param>
 public void Cut(Vegetable vegetable)
 {
     vegetable.IsCut = true;
 }
예제 #16
0
 private void PutIn(Utensil utensil, Vegetable vegetable)
 {
     string result = utensil.Add(vegetable);
     this.cookingLog.Add(result);
 }
예제 #17
0
파일: Chef.cs 프로젝트: vassil/CSharp
 /// <summary>
 /// Peel the <paramref name="vegetable"/>
 /// </summary>
 /// <param name="vegetable">Vegetable name</param>
 public void Peel(Vegetable vegetable)
 {
     vegetable.IsPeeled = true;
 }
예제 #18
0
 private static void Cut(Vegetable vegetable)
 {
     vegetable.Cut();
 }
예제 #19
0
 static void Cook(Vegetable vegetable)
 {
     vegetable.IsCooked = true;
 }
예제 #20
0
 internal void Add(Vegetable vegetable)
 {
     throw new NotImplementedException();
 }