Skip to content

Commit 2ee12bd

Browse files
authored
Support Azurite Blob Storage for devolpment (#982)
1 parent 3495b86 commit 2ee12bd

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

dotnet/src/dotnetframework/Providers/Storage/GXAzureStorage/AzureStorageExternalProvider.cs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,15 @@ private void Initialize()
5656
string publicContainer = GetEncryptedPropertyValue(PUBLIC_CONTAINER);
5757
string privateContainer = GetEncryptedPropertyValue(PRIVATE_CONTAINER);
5858

59-
59+
string useDevelopmentStorage = Environment.GetEnvironmentVariable("AzuriteUseDevelopmentStorage");
60+
CloudStorageAccount storageAccount;
61+
62+
if (string.Equals(useDevelopmentStorage, "true", StringComparison.OrdinalIgnoreCase))
63+
storageAccount = CloudStorageAccount.Parse("UseDevelopmentStorage=true");
64+
else {
6065
StorageCredentials credentials = new StorageCredentials(Account, Key);
61-
CloudStorageAccount storageAccount = new CloudStorageAccount(credentials, true);
66+
storageAccount = new CloudStorageAccount(credentials, true);
67+
}
6268

6369
Client = storageAccount.CreateCloudBlobClient();
6470

0 commit comments

Comments
 (0)