コード例 #1
0
        public async Task ProcessAsync(CatalogPageEntry page, IReadOnlyList <CatalogEntry> leaves)
        {
            var latestLeaves = leaves
                               .GroupBy(x => new PackageIdentity(x.Id, x.Version.ToNormalizedString()))
                               .Select(x => x
                                       .OrderByDescending(y => y.CommitTimeStamp)
                                       .First())
                               .ToList();

            var identityToPackageKey = await _packageService.AddOrUpdatePackagesAsync(latestLeaves);

            await _catalogService.AddOrUpdateAsync(page, leaves, identityToPackageKey);

            await _packageService.SetDeletedPackagesAsUnlistedInV2Async(latestLeaves.Where(x => x.IsDelete));
        }
コード例 #2
0
 public async Task ProcessBatchAsync(IReadOnlyList <PackageArchiveMetadata> batch)
 {
     await _packageService.AddOrUpdatePackagesAsync(batch);
 }