示例#1
0
        private void InitMachine(int feePercent)
        {
            _feesPercentToAdd = new FeePercentage(feePercent);

            ProductManager = new ProductManager();
            RecipeManager  = new RecipeManager(ProductManager.GetProductList(), _feesPercentToAdd);
        }
示例#2
0
        public Recipe(string recipeName, FeePercentage feesPercentToAdd)
        {
            if (string.IsNullOrWhiteSpace(recipeName))
            {
                throw new Exception($"Recipe: recipeName cannot be null");
            }

            _recipeIngredients = new List <Ingredient>();

            RecipeName = recipeName;
            RecipeId   = "recipe-" + Guid.NewGuid().ToString();

            _feesPercentToAdd = feesPercentToAdd;
        }
示例#3
0
        public RecipeManager(Dictionary <string, Product> productList, FeePercentage Fee)
        {
            _percentFeesToAdd = Fee;

            _products = productList;
        }