using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Model
{
///
/// Define how to manage recipes.
///
public interface IRecipeManager
{
///
/// Get or set the currently selected recipe.
///
Recipe? CurrentSelected { get; set; }
///
/// Get all the recipe in the data.
///
/// The RecipeCollection containing the recipes stored in the data.
RecipeCollection GetAllRecipes();
///
/// Get the recipe corresponding to the id.
///
/// The id of the recipe we want.
/// The recipe corresponding to the id.
Recipe GetRecipeFromId(int id);
///
/// Search in data the recipes containing this part of title.
///
/// Search string.
/// The RecipeCollection of recipes corresponding to the search.
RecipeCollection SearchRecipeByTitle(string title);
///
/// Get all the recipes created by the author.
///
/// The author's mail.
/// The RecipeCollection of the recipe created by the author.
RecipeCollection GetRecipeByAuthor(string authorMail);
///
/// Get an ordored list of the recipes sorted by the priority list.
///
/// The priority list.
/// The RecipeCollection ordored by the priority list.
RecipeCollection GetRecipesByPriorityOrder(IEnumerable priority);
///
/// Add a recipe to the data.
///
/// The recipe to add.
/// Weither the adding succed or not.
bool AddRecipeToData(Recipe recipe);
///
/// Modify the recipe with a new one in the data.
///
/// The new recipe
/// Weither the modification succed or not.
bool ModifyCurrentSelected(Recipe newRecipe);
}
}