private static void WriteWorkoutList(IList <Workout> workouts) { if (workouts != null) { File.WriteAllText(WorkoutFile, ListConverter.ConvertListToString(workouts)); } }
public static List <Workout> GetWorkoutList() { if (!File.Exists(WorkoutFile)) { return(new List <Workout>()); } var workouts = File.ReadAllText(WorkoutFile); return(ListConverter.ConvertStringToList <Workout>(workouts) ?? new List <Workout>()); }