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; }
// 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); }
/// <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; }
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; }
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)); }
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)); }
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()); ; }