IsValidContainerName() public static method

Is valid container name http://msdn.microsoft.com/en-us/library/windowsazure/dd135715.aspx
public static IsValidContainerName ( string containerName ) : bool
containerName string Container name
return bool
Beispiel #1
0
 /// <summary>
 /// Check whether the container name is valid. If not throw an exception
 /// </summary>
 /// <param name="name">Container name</param>
 public static void ValidateContainerName(string name)
 {
     if (!NameUtil.IsValidContainerName(name))
     {
         throw new ArgumentException(String.Format(CultureInfo.CurrentCulture, Resources.InvalidContainerName, name));
     }
 }
        public void SetDestinationContainer(IStorageBlobManagement channel, string containerName)
        {
            if (Container == null)
            {
                if (!NameUtil.IsValidContainerName(containerName))
                {
                    throw new ArgumentException(String.Format(Resources.InvalidContainerName, containerName));
                }

                Container = channel.GetContainerReference(containerName);
            }
        }