diff --git a/MCTG/Model/Quantity.cs b/MCTG/Model/Quantity.cs index d59a3a6..ccaf89d 100644 --- a/MCTG/Model/Quantity.cs +++ b/MCTG/Model/Quantity.cs @@ -6,7 +6,31 @@ using System.Threading.Tasks; namespace Model { - internal class Quantity + public class Quantity { + #region Attributes + /// + /// get the quatity of ingredient + /// + private int number; + /// + /// have the Unit enum of the quantity of ingredient + /// + private Unit unit; + + #endregion + + public int Number + { + get { return number; } + set + { + if (value <0 ) + { + throw new ArgumentException("Si la quantité est inférieur à 0, enlever l'ingrédient!"); + } + number = value; + } + } } }