// 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()); //dataMgr.Serializer = new DataContractXML(xmlFolderPath: "../../../../DataPersistence/data"); dataMgr.Serializer = new DataContractJSON(); // /!\ here is an absolute path I put for testing purpose. It will only work on my computer so don't forget to change it whene you test. //dataMgr.Export(rc[2], "C:\\Users\\alex6\\Downloads\\recipe2.json"); //dataMgr.Import("C:\\Users\\alex6\\Downloads\\recipe2.json"); RecipeCollection rc = new RecipeCollection("All recipes", dataMgr.Data[nameof(Recipe)].Cast().ToArray()); dataMgr.Save(); MenuManager menuMgr = new MenuManager(dataMgr); menuMgr.Loop(); // press any key to quit //Console.ReadKey();