public AzureStorageHelper()
        {
            Console.WriteLine("Using Storage Container " + ENV.Get("APPSETTING_StorageContainer"));
            storageAccount = CloudStorageAccount.Parse(ENV.Get("CUSTOMCONNSTR_StorageConnectionString"));
            blobClient     = storageAccount.CreateCloudBlobClient();
            container      = blobClient.GetContainerReference(ENV.Get("APPSETTING_StorageContainer"));
            container.CreateIfNotExists();
            var perm = new BlobContainerPermissions();

            perm.PublicAccess = BlobContainerPublicAccessType.Container;
            container.SetPermissions(perm);
        }
Ejemplo n.º 2
0
        public static void Main(string[] args)
        {
            Console.WriteLine("Initializing AzureStorageHelper!");

            storageHelper = new AzureStorageHelper();

            path = ENV.Get("APPSETTING_FilesLocation");

            Console.WriteLine("Loading files from " + path);

            TraverseDirectory(new DirectoryInfo(path));

            Console.WriteLine("AzureStorageHelper Done at " + DateTime.Now.ToString() + " Stopping!");
        }