public static async Task ChangeAccessPolicy(string connectionString, string containerName, string updatePermission) { CloudBlobClient cloudBlobClient = ConnectAzureStroage.ProcessConnection(connectionString); CloudBlobContainer cloudBlobContainer = cloudBlobClient.GetContainerReference(containerName); SetPermission.SetBlobPermission(cloudBlobContainer, updatePermission); }
public static async Task <bool> CreateBlobContainer(string connectionString, string containerName, string permission) { CloudBlobClient cloudBlobClient = ConnectAzureStroage.ProcessConnection(connectionString); if (cloudBlobClient != null) { CloudBlobContainer cloudBlobContainer = cloudBlobClient.GetContainerReference(containerName); await cloudBlobContainer.CreateAsync(); SetPermission.SetBlobPermission(cloudBlobContainer, permission); return(true); } return(false); }