private void ClearAllBlobSecrets() { var blobs = BlobContainer.ListBlobs(prefix: TestSiteName.ToLowerInvariant(), useFlatBlobListing: true); foreach (IListBlobItem blob in blobs) { BlobContainer.GetBlockBlobReference(((CloudBlockBlob)blob).Name).DeleteIfExists(); } }
private async Task ClearAllBlobSecrets() { await BlobContainer.CreateIfNotExistsAsync(); var blobs = await BlobContainer.ListBlobsSegmentedAsync(prefix : TestSiteName.ToLowerInvariant(), useFlatBlobListing : true, blobListingDetails : BlobListingDetails.None, maxResults : 100, currentToken : null, options : null, operationContext : null); foreach (IListBlobItem blob in blobs.Results) { await BlobContainer.GetBlockBlobReference(((CloudBlockBlob)blob).Name).DeleteIfExistsAsync(); } }
private async Task ClearAllBlobSecrets() { // A sas connection requires the container to already exist, it // doesn't have permission to create it if (RepositoryType != SecretsRepositoryType.BlobStorageSas) { await BlobContainer.CreateIfNotExistsAsync(); } var blobs = await BlobContainer.ListBlobsSegmentedAsync(prefix : TestSiteName.ToLowerInvariant(), useFlatBlobListing : true, blobListingDetails : BlobListingDetails.None, maxResults : 100, currentToken : null, options : null, operationContext : null); foreach (IListBlobItem blob in blobs.Results) { await BlobContainer.GetBlockBlobReference(((CloudBlockBlob)blob).Name).DeleteIfExistsAsync(); } }
private string RelativeBlobPath(string functionNameOrHost) { return(string.Format("{0}/{1}.json", TestSiteName.ToLowerInvariant(), functionNameOrHost.ToLowerInvariant())); }