public static bool TryParse(out CloudStorageAccountEx accountEx, params string[] connectionStrings) { if (connectionStrings == null) { throw new ArgumentNullException(nameof(connectionStrings)); } if (connectionStrings.Length == 0) { throw new ArgumentException(nameof(connectionStrings)); } bool result = true; CloudStorageAccount[] accounts = new CloudStorageAccount[connectionStrings.Length]; for (int i = 0; i < connectionStrings.Length; i++) { CloudStorageAccount account; result &= CloudStorageAccount.TryParse(connectionStrings[i], out account); accounts[i] = account; } accountEx = (result) ? new CloudStorageAccountEx(accounts) : null; return(result); }
public static CloudStorageAccountEx Parse(params string[] connectionStrings) { if (connectionStrings == null) { throw new ArgumentNullException(nameof(connectionStrings)); } if (connectionStrings.Length == 0) { throw new ArgumentException(nameof(connectionStrings)); } CloudStorageAccount[] accounts = new CloudStorageAccount[connectionStrings.Length]; for (int i = 0; i < connectionStrings.Length; i++) { CloudStorageAccount account; account = CloudStorageAccount.Parse(connectionStrings[i]); accounts[i] = account; } CloudStorageAccountEx accountEx = new CloudStorageAccountEx(accounts); return(accountEx); }