public static ObservableCollection <SessionModel> GetSessions(int profileId) { ObservableCollection <SessionModel> sessionLoaded = new ObservableCollection <SessionModel>(); foreach (var item in PathManager.GetSessionsInfoFilesPaths(profileId)) { sessionLoaded.Add((SessionModel)JsonSerDer.LoadObject <SessionModel>(item)); } // var profilesSorted = sessionLoaded.OrderBy(x => x.Id).ToList(); return(sessionLoaded); }
public static List <ProfileModel> GetProfiles() { List <ProfileModel> profilesLoaded = new List <ProfileModel>(); foreach (var item in PathManager.GetProfilesInfoFilesPaths()) { profilesLoaded.Add((ProfileModel)JsonSerDer.LoadObject <ProfileModel>(item)); } var profilesSorted = profilesLoaded.OrderBy(x => x.Id).ToList(); return(profilesSorted); }