/// <summary> /// Add a remove entry and return the page commit. /// </summary> private async Task <JObject> GetRemoveCommit(PackageIdentity package) { // Create package details page for the delete var packageDetails = await CatalogUtility.CreateDeleteDetailsAsync(package, string.Empty, CatalogBaseURI, _context.CommitId); var packageDetailsFile = _context.Source.Get(packageDetails.GetEntityId()); await packageDetailsFile.Write(packageDetails, _context.Log, _context.Token); // Create commit return(CatalogUtility.CreatePageCommit( package, packageDetailsFile.EntityUri, _context.CommitId, SleetOperation.Remove, "nuget:PackageDelete")); }
public async Task RemovePackageAsync(PackageIdentity package) { // Create package details page for the delete var packageDetails = await CatalogUtility.CreateDeleteDetailsAsync(package, string.Empty, CatalogBaseURI, _context.CommitId); var packageDetailsFile = _context.Source.Get(packageDetails.GetEntityId()); await packageDetailsFile.Write(packageDetails, _context.Log, _context.Token); // Create commit var pageCommit = CatalogUtility.CreatePageCommit( package, packageDetailsFile.EntityUri, _context.CommitId, SleetOperation.Remove, "nuget:PackageDelete"); await AddCatalogEntry(pageCommit, "nuget:lastDeleted"); }