コード例 #1
0
        public void Cook()
        {
            Bowl bowl = new Bowl();
            Potato potato = this.GetPotato();
            Carrot carrot = this.GetCarrot();
            this.GetBowl();

            this.Peel(potato);
            this.Peel(carrot);

            this.Cut(potato);
            this.Cut(carrot);

            bowl.Add(carrot);
            bowl.Add(potato);
        }
コード例 #2
0
        public void Cook()
        {
            Potato potato = this.GetPotato();

            this.Peel(potato);
            this.Cut(potato);

            Carrot carrot = this.GetCarrot();

            this.Peel(carrot);
            this.Cut(carrot);

            Bowl bowl = this.GetBowl();

            bowl.Add(potato);
            bowl.Add(carrot);
        }
コード例 #3
0
ファイル: Chef.cs プロジェクト: zhoudaqing/Telerik-Academy
        public void CookByProducts(params NaturalFood[] products)
        {
            Bowl bowl = this.GetBowl();

            foreach (var product in products)
            {
                bowl.Add(product);
            }

            // ...
        }