public UnlistPackage ( string packageId, string version = "1.0.0" ) : Task | ||
packageId | string | |
version | string | |
return | Task |
public async Task FailToUnlist(ClientSdkHelper helper, string unlistApiKey = null) { if (CanUseApiKeyToUnlist(unlistApiKey)) { throw new ArgumentException($"Cannot use {unlistApiKey} to fail to unlist a package ({Id} {Version}) that was pushed by {UploadApiKey}.", nameof(unlistApiKey)); } await PackageIsReady; await helper.UnlistPackage(Id, UploadHelper.GetUniquePackageVersion(), unlistApiKey, success : false); }
public async Task Unlist(ClientSdkHelper helper, string unlistApiKey = null) { if (!CanUseApiKeyToUnlist(unlistApiKey)) { throw new ArgumentException($"Cannot use {unlistApiKey} to unlist a package ({Id} {Version}) that was pushed by {UploadApiKey}.", nameof(unlistApiKey)); } await PackageIsReady; lock (ExistingPackagesLock) { Listed = false; UnlistApiKey = unlistApiKey; PackageIsReady = helper.UnlistPackage(Id, Version, unlistApiKey, success: true); } await PackageIsReady; }