Ejemplo n.º 1
0
        public async Task Initialize()
        {
            //the main.xml file
            _showProgressBar = true;
            if (settingsService != null)
            {
                settingsService.Initialize();
            }

            object mainFile = await fileService.GetFile("BlackberryRepos.js");

            string mainFileContent = await fileService.ReadFileString(mainFile);

            repos             = (ObservableCollection <RepoItem>)serializationService.DeSerialize(mainFileContent, typeof(ObservableCollection <RepoItem>));
            this.IsDataLoaded = true;
            if (this.repos.Count != 0)
            {
                ShowProgressBar = false;
            }


            var query = this.repos.GroupBy(x => x.language)
                        .Select(x => new Group <RepoItem>(x.Key, x));

            foreach (var item in query)
            {
                Items.Add(item);
            }
        }