Exemplo n.º 1
0
        private IEnumerable <SourcePackageModel> CreateModel()
        {
            IApplicationPackageManager packageManager = Locator.Get <IApplicationPackageManager>();

            IPackage[] sourcePackages = packageManager.SearchSourcePackages(SearchTerms).Where(x => x.IsLatestVersion).OrderByDescending(x => x.DownloadCount).ThenBy(x => x.Id).ToArray();
            ISourcePackageModelProvider modelProvider = Locator.Get <ISourcePackageModelProvider>();

            return(modelProvider.CreateModels(sourcePackages));
        }