You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
100 lines
3.8 KiB
100 lines
3.8 KiB
using Model;
|
|
using System;
|
|
using System.Collections.Concurrent;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace ConsoleApp
|
|
{
|
|
internal struct Stub
|
|
{
|
|
public List<Recipe> LoadRecipes()
|
|
{
|
|
List<Recipe> stub = new List<Recipe>();
|
|
stub.AddRange(new[]
|
|
{
|
|
new Recipe(),
|
|
new Recipe(
|
|
title: "Cookies"),
|
|
new Recipe(
|
|
title: "Cookies", id: 23),
|
|
new Recipe(
|
|
title: "Cookies au chocolat", id: null),
|
|
new Recipe(
|
|
title: "", id: null),
|
|
new Recipe(
|
|
title: "", id: 24),
|
|
new Recipe(
|
|
title: "Cookies", id: 24,
|
|
preparationSteps: new[]{
|
|
new PreparationStep(1)
|
|
}),
|
|
new Recipe(
|
|
title: "Cookies", id: 26,
|
|
preparationSteps: new[]{
|
|
new PreparationStep(1),
|
|
new PreparationStep(2, "Faire cuire.")
|
|
}),
|
|
new Recipe(
|
|
title: "Gateau à la crème",
|
|
preparationSteps: new[]{
|
|
new PreparationStep(1, "Ajouter les oeufs."),
|
|
new PreparationStep(2, "Ajouter la farine."),
|
|
new PreparationStep(3, "Mélanger le tout."),
|
|
new PreparationStep(4, "Faire cuire 1h10 au four traditionnel.")
|
|
}),
|
|
new Recipe(
|
|
title: "Gateau au chocolat",
|
|
preparationSteps: new[]{
|
|
new PreparationStep(1, "Ajouter les oeufs."),
|
|
new PreparationStep(2, "Ajouter la farine."),
|
|
new PreparationStep(2, "Ajouter 100g de chocolat fondu."),
|
|
new PreparationStep(3, "Mélanger le tout."),
|
|
new PreparationStep(4, "Faire cuire 45h au four traditionnel.")
|
|
}),
|
|
new Recipe(
|
|
title: "Gateau aux cerises",
|
|
preparationSteps: new[]{
|
|
new PreparationStep(1, "Ajouter les oeufs."),
|
|
new PreparationStep(2, "Ajouter la farine."),
|
|
new PreparationStep(2, "Ajouter des morceaux de fraises découpées en petits carré"),
|
|
new PreparationStep(3, "Mélanger le tout."),
|
|
new PreparationStep(4, "Faire cuire 30min au four traditionnel.")
|
|
}),
|
|
});
|
|
return stub;
|
|
}
|
|
|
|
public List<RecipeCollection> LoadRecipeCollection()
|
|
{
|
|
List<RecipeCollection> stub = new List<RecipeCollection>();
|
|
stub.AddRange(new[]
|
|
{
|
|
new RecipeCollection("All", LoadRecipes().ToArray()),
|
|
new RecipeCollection("Starters", LoadRecipes().FindAll(x => x.Id.Equals(23)).ToArray()),
|
|
new RecipeCollection("Dishies", LoadRecipes().FindAll(x => x.Id.Equals(24)).ToArray()),
|
|
new RecipeCollection("Desserts", LoadRecipes().FindAll(x => x.Id.Equals(26)).ToArray()),
|
|
});
|
|
return stub;
|
|
}
|
|
|
|
|
|
public List<User> ConstrucList()
|
|
{
|
|
List<User> Users = new List<User>();
|
|
|
|
User Roger = new User("Roger", "Rabbit", "carotte@mail.fr");
|
|
User Dylan = new User("d", "r", "dr@mail.fr");
|
|
User Val = new User("V", "entin", "Valentin@mail.fr");
|
|
|
|
Users.Add(Roger);
|
|
Users.Add(Dylan);
|
|
Users.Add(Val);
|
|
|
|
return Users;
|
|
}
|
|
}
|
|
}
|