Ejemplo n.º 1
0
        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);
        }
Ejemplo n.º 2
0
        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);
        }