From a0ef354b43d6d9030206ac0627e3db0dc6599036 Mon Sep 17 00:00:00 2001 From: Alexandre Agostinho Date: Wed, 10 May 2023 18:19:17 +0200 Subject: [PATCH] fix build --- MCTG/Model/Recipe.cs | 60 -------------------------------------------- 1 file changed, 60 deletions(-) delete mode 100644 MCTG/Model/Recipe.cs diff --git a/MCTG/Model/Recipe.cs b/MCTG/Model/Recipe.cs deleted file mode 100644 index b43440b..0000000 --- a/MCTG/Model/Recipe.cs +++ /dev/null @@ -1,60 +0,0 @@ -using System.Text; - -namespace Model -{ - public class Recipe - { - public uint Id { get; set; } - public string Title { get; set; } - public List Ingredients { get; set; } - public string Preparation { get; set; } - - /// - /// Constructor of a Recipe. - /// - /// Identificator - /// The name of the recipe - /// A list of ingredient needed by the preparation - /// The text that explain the preparation of the recipe - public Recipe(uint id, string title, List ingredients, string preparation) - { - Id = id; - Title = title; - Ingredients = ingredients; - Preparation = preparation; - } - - /// - /// Concatenate the list of ingredients in a single string - /// - /// The list of ingredients in string format - private string ConcatIngredients() - { - StringBuilder sb = new StringBuilder(); - foreach (string str in Ingredients) sb.Append("\t- " + str + "\n"); - - return sb.ToString(); - } - - /// - /// Build a string with all elements (title, ingredients, preparation, ...) - /// - /// A string that represent the recipe - public override string ToString() - { - return $"{Title} -- id:{Id}\n\n" - + "List of ingredient:\n" - + ConcatIngredients() + "\n\n" - + "Preparation:\n" - + $"{Preparation}\n"; - } - - /// - /// Display the recipe in the console - /// - public void Display() - { - Console.WriteLine(this.ToString()); - } - } -} \ No newline at end of file