Example #1
0
 /// <summary>
 /// Opens a container or Creates if one with the given name does not exist.
 /// </summary>
 /// <param name="containerName">The name of the container to open. If the container with the given name does not exist, it will be creted.</param>
 /// <param name="accessControl">Could be public or private.</param>
 /// <returns>Success/Failure whether open/create succeeded or not.</returns>
 public override bool OpenOrCreate(string containerName, string accessControl)
 {
     bool result = true;
     blobContainer = blobStorage.GetBlobContainer(containerName);
     if (!blobContainer.DoesContainerExist())
     {
         result = blobContainer.CreateContainer();
     }
     blobContainer.SetContainerAccessControl((ContainerAccessControl)Enum.Parse(typeof(ContainerAccessControl), accessControl, true));
     return result;
 }