Esempio n. 1
0
        public CloudFileSystem(RegistryView settingsRoot, string accountName, string accountKey)
        {
            _accountSettings = settingsRoot["azure-storage"];

            if (string.IsNullOrEmpty(accountKey)) {
                // load it if not given
                accountKey = _accountSettings[accountName, "key"].EncryptedStringValue;
            } else {
                // store it if given
                _accountSettings[accountName, "key"].EncryptedStringValue = accountKey;
            }
            _account = new CloudStorageAccount(new StorageCredentialsAccountAndKey(accountName, accountKey), true);
            _blobStore = _account.CreateCloudBlobClient();
        }
Esempio n. 2
0
 public CloudFileSystem(RegistryView settingsRoot, string accountName)
     : this(settingsRoot, accountName, null)
 {
 }