Microsoft.WindowsAzure.Commands.Utilities.CloudService.ServiceSettings.ValidateStorageAccountName C# (CSharp) Method

ValidateStorageAccountName() private static method

Validate that the storage account name contains only lower case letters or numbers and is between 3 and 24 characters in length (per http://msdn.microsoft.com/en-us/library/windowsazure/hh264518.aspx) unless the string is empty (which can happen if it wasn't provided or generated).
private static ValidateStorageAccountName ( string name ) : void
name string The storage account name.
return void
        private static void ValidateStorageAccountName(string name)
        {
            if (!string.IsNullOrEmpty(name) &&
                (!name.All(c => char.IsLower(c) || char.IsDigit(c)) ||
                  name.Length < MinimumStorageAccountNameLength ||
                  name.Length > MaximumStorageAccountNameLength))
            {
                throw new ArgumentException(string.Format(Resources.ServiceSettings_ValidateStorageAccountName_InvalidName, name));
            }
        }