示例#1
0
            private void ClearAllBlobSecrets()
            {
                var blobs = BlobContainer.ListBlobs(prefix: TestSiteName.ToLowerInvariant(), useFlatBlobListing: true);

                foreach (IListBlobItem blob in blobs)
                {
                    BlobContainer.GetBlockBlobReference(((CloudBlockBlob)blob).Name).DeleteIfExists();
                }
            }
示例#2
0
            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();
                }
            }
示例#3
0
            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();
                }
            }
示例#4
0
 private string RelativeBlobPath(string functionNameOrHost)
 {
     return(string.Format("{0}/{1}.json", TestSiteName.ToLowerInvariant(), functionNameOrHost.ToLowerInvariant()));
 }