static void Main(string[] args) { LoadFood loadFood = new LoadFood(@"~\..\..\..\AppData\FoodDB.csv"); CsvLoader foodLoader = new CsvLoader(loadFood); foodLoader.LoadCsvFile(); LoadExercises exercises = new LoadExercises(@"~\..\..\..\AppData\ExerciseDB.csv"); CsvLoader exerciseLoader = new CsvLoader(exercises); exerciseLoader.LoadCsvFile(); DateTime start = new DateTime(2018, 05, 08); DateTime end = new DateTime(2018, 05, 09); // Go with this hardcoded interval in seconds. int interval = 60 * 30; TimeSeries ts = new TimeSeries(start, end, interval); FoodEntity foodEntity = GetFood(loadFood); // Hack foodEntity.GlycemicIndex = 200; ts.InsertEvent(foodEntity, start.AddHours(1), interval); ExerciseEntity exerciseEntity = GetExercise(exercises); // Hack exerciseEntity.ExerciseIndex = 200; ts.InsertEvent(exerciseEntity, start.AddHours(7), interval); Console.WriteLine("Start Output"); PrintRange(start, end, ts); return; }
private static FoodEntity GetFood(LoadFood loadFood) { return(loadFood.FoodValues["Banana cake, made with sugar".ToLower()]); }