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.
30 lines
980 B
30 lines
980 B
// See https://aka.ms/new-console-template for more information
|
|
|
|
using ConsoleApp;
|
|
using ConsoleApp.Menu;
|
|
using DataPersistence;
|
|
using Model;
|
|
using System.Linq;
|
|
using System.Text;
|
|
|
|
Console.WriteLine("Hello, World!\n\n");
|
|
|
|
|
|
// TESTS:
|
|
//DataManager dataMgr = new DataManager(new Stubs());
|
|
|
|
//DataManager dataMgr = new DataManager(new DataContractXML(xmlFolderPath: "../../../../DataPersistence/data"));
|
|
DataManager dataMgr = new DataManager(new DataContractJSON(jsonFolderPath: "../../../../DataPersistence/data"));
|
|
|
|
RecipeCollection rc = new RecipeCollection("All recipes", dataMgr.Data["recipes"].Cast<Recipe>().ToArray());
|
|
|
|
Recipe? ret = SearcherRecipe.ResearchOn(rc);
|
|
Console.WriteLine(ret);
|
|
|
|
//dataMgr.Serializer = new DataContractXML(xmlFolderPath: "../../../../DataPersistence/data");
|
|
//dataMgr.Serializer = new DataContractJSON(jsonFolderPath: "../../../../DataPersistence/data");
|
|
dataMgr.Save();
|
|
|
|
// press any key to quit
|
|
Console.ReadKey();
|