Beispiel #1
0
        protected override async Task <bool> OnProcessBatchAsync(
            CollectorHttpClient client,
            IEnumerable <CatalogCommitItem> items,
            JToken context,
            DateTime commitTimeStamp,
            bool isLastBatch,
            CancellationToken cancellationToken)
        {
            var catalogEntries = items.Select(item => CatalogEntry.Create(item))
                                 .ToList();

            // Sanity check:  a single catalog batch should not contain multiple entries for the same package identity.
            AssertNoMultipleEntriesForSamePackageIdentity(commitTimeStamp, catalogEntries);

            // Process .nupkg/.nuspec adds and deletes.
            var processedCatalogEntries = await ProcessCatalogEntriesAsync(client, catalogEntries, cancellationToken);

            // Update the package version index with adds and deletes.
            await UpdatePackageVersionIndexAsync(processedCatalogEntries, cancellationToken);

            return(true);
        }