AzurelensBlob.BlobManager.CreateStorageAccountFromConnectionString C# (CSharp) Метод

CreateStorageAccountFromConnectionString() приватный статический Метод

Validates the connection string information in app.config and throws an exception if it looks like the user hasn't updated this to valid values.
private static CreateStorageAccountFromConnectionString ( string storageConnectionString ) : CloudStorageAccount
storageConnectionString string The storage connection string
Результат CloudStorageAccount
        private static CloudStorageAccount CreateStorageAccountFromConnectionString(string storageConnectionString)
        {
            CloudStorageAccount storageAccount;
            try
            {
                storageAccount = CloudStorageAccount.Parse(storageConnectionString);
            }
            catch (FormatException)
            {
                Log.LogError("Invalid storage account information provided. Please confirm the AccountName and AccountKey are valid in the app.config file - then restart the sample.");
                throw;
            }
            catch (ArgumentException)
            {
                Log.LogError("Invalid storage account information provided. Please confirm the AccountName and AccountKey are valid in the app.config file - then restart the sample.");
                throw;
            }

            return storageAccount;
        }