public MainCourse(string name, decimal price, int calories, 
     int quantityPerServing, int timeToPrepare, 
     bool isVegan, MainCourseType type)
     : base(name, price, calories, quantityPerServing, timeToPrepare, isVegan)
 {
     this.type = type;
 }
Exemple #2
0
        // string name, decimal price, int calories, int quantityPerServing, int timeToPrepare, bool isVegan, string type
        public IMainCourse CreateMainCourse(string name, decimal price, int calories, int quantityPerServing, int timeToPrepare, bool isVegan, string type)
        {
            MainCourseType courseType = GetMainCourseType(type);
            var            mainCourse = new MainCourse(name, price, calories, quantityPerServing, MetricUnit.Grams, timeToPrepare, isVegan, courseType);

            return(mainCourse);
        }
Exemple #3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="MainCourse"/> class.
 /// </summary>
 /// <param name="name">
 /// The name.
 /// </param>
 /// <param name="price">
 /// The price.
 /// </param>
 /// <param name="calories">
 /// The calories.
 /// </param>
 /// <param name="quantity">
 /// The quantity.
 /// </param>
 /// <param name="time">
 /// The time.
 /// </param>
 /// <param name="isVegan">
 /// The is vegan.
 /// </param>
 /// <param name="type">
 /// The type.
 /// </param>
 public MainCourse(
     string name,
     decimal price,
     int calories,
     int quantity,
     int time,
     bool isVegan,
     MainCourseType type)
     : base(name, price, calories, quantity, time, isVegan)
 {
     this.type = type;
 }
Exemple #4
0
 public MainCourse(
     string name,
     decimal price,
     int calories,
     int quantityPerServing,
     int timeToPrepare,
     bool isVegan,
     MainCourseType type)
     : base(
         name,
         price,
         calories,
         quantityPerServing,
         timeToPrepare)
 {
     this.IsVegan = isVegan;
     this.Type    = type;
 }
Exemple #5
0
 public MainCourse(string initialName, decimal initialPrice, int initialCalories,
                   int initialQuantityPerServing, int initialTimeToPrepare, bool initialIsVegan, MainCourseType initialType)
     : base(initialName, initialPrice, initialCalories, initialQuantityPerServing, initialTimeToPrepare, initialIsVegan)
 {
     this.Type = initialType;
 }
Exemple #6
0
 public MainCourse(string initialName, decimal initialPrice, int initialCalories,
     int initialQuantityPerServing, int initialTimeToPrepare, bool initialIsVegan, MainCourseType initialType)
     : base(initialName, initialPrice, initialCalories, initialQuantityPerServing, initialTimeToPrepare, initialIsVegan)
 {
     this.Type = initialType;
 }
        public IMainCourse CreateMainCourse(string name, decimal price, int calories, int quantityPerServing, int timeToPrepare, bool isVegan, string type)
        {
            MainCourseType parsedType = (MainCourseType)(Enum.Parse(typeof(MainCourseType), type));

            return(new MainCourse(name, price, calories, quantityPerServing, timeToPrepare, isVegan, parsedType));
        }
Exemple #8
0
        public IMainCourse CreateMainCourse(string name, decimal price, int calories, int quantityPerServing, int timeToPrepare, bool isVegan, string type)
        {
            MainCourseType mainCourseType = GetMainCourseTypeEnum(type);

            return(new MainCourse(name, price, calories, quantityPerServing, timeToPrepare, isVegan, mainCourseType));
        }
Exemple #9
0
 public MainCourse(string name, decimal price, int calories, int quantityPerServing, MetricUnit unit, int timeToPrepare, MainCourseType type)
     : base(name, price, calories, quantityPerServing, unit, timeToPrepare)
 {
     Type = (MainCourseType)Enum.Parse(typeof(MainCourseType), type.ToString()); ;
 }